Skip to main content

Posts

Showing posts with the label ASSIGNMENT HUB

Mix of Many

There is some personal infomation in the introduction and end. Please remove them before use. #include<conio.h> #include<string.h> #include<bios.h> #include<iostream.h> #include<dos.h> #include<stdio.h> #include<stdlib.h> #include<iomanip.h> void starting() { clrscr(); int i,j; textbackground(BLACK); textcolor(YELLOW); clrscr(); delay(100); for (i=2,j=63;j>68,i<28;i++,j--) { delay(100); gotoxy(i,8); cputs(" Navi Arora "); } textcolor(CYAN+BLINK); gotoxy(36,21); cputs(" PRESENTS " ); { sound(600); delay(200); nosound(); sound(7); delay(200); nosound(); sound(600); delay(200); nosound(); sound(7); delay(200); nosound(); sound(600); delay(200); nosound(); sound(7); delay(200); nosound(); sound(600); delay(200); nosound(); sound(7); delay(200); nosound(); sound(700); delay(200); nosound(); sound(7); ...

Periodic Table Program

#include<iostream.h> #include<conio.h> #include<graphics.h> #include<stdio.h> #include<ctype.h> #include<process.h> #include<string.h> #include<dos.h> #include<fstream.h> void element(int,int); void welcome_screen() { clrscr(); for(int x=50;x>=20;x--) { delay(160); gotoxy(x,12); cputs(" P R O J E C T "); gotoxy(x,14); cputs(" D E V E L O P E D B Y : "); gotoxy(x,16); cputs("CBSE PORTAL"); } gotoxy(x,24); cputs("Press Any Key To Continue...."); getch(); } int i,j,g; void frame() { gotoxy(19,9); cout<<"É"; for(i=20;i<=60;i++) { gotoxy(i,9); cout<<"Í"; } cout<<"»"; gotoxy(19,16); cout<<"È"; for(i=20;i<=60;i++) { gotoxy(i,16); cout<<"Í"; } cout<<"¼"; for(i=10;i<=15;i++) { gotoxy(19,i); ...

C++ Program for CASINO GAME PROJECT

#include<iostream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> #include<time.h> void draw_line(int n,char ch); void rules(); void main() { int balanceamt,amt,no,dice; char playername[80],ch; clrscr(); draw_line(60,'='); cout<<"\n\n\n\n\t\tCASINO GAME\n\n\n\n"; draw_line(60,'='); cout<<"\n\n\nEnter Your Name :"; gets(playername); cout<<"\n\n\Enter Deposit amount to play game :"; cin>>balanceamt; do { clrscr(); rules(); cout<<"\n\nYour current balance is Rs."<<balanceamt; do { cout<<"\n\n"<<playername<<" enter money to bet"; cin>>amt; if(amt>balanceamt) cout<<"Your betting amount is more than your current balance\n\nRe-enter data\n "; else break; }while(1); do { cout<<"Enter your lucky number to bet between 1 to 12 :"; cin>>no; if(no...

HANGMAN PROJECT

#include <iostream.h> #include <stdlib.h> #include <string.h> #include <conio.h> const int MAXLENGTH=80; const int MAX_TRIES=5; const int MAXROW=7; int letterFill (char, char[], char[]); void initUnknown (char[], char[]); int main () { char unknown [MAXLENGTH]; char letter; int num_of_wrong_guesses=0; char word[MAXLENGTH]; char words[][MAXLENGTH] = { "india", "pakistan", "nepal", "malaysia", "philippines", "australia", "iran", "ethiopia", "oman", "indonesia" }; //choose and copy a word from array of words randomly randomize(); int n=random(10); strcpy(word,words[n]); // Initialize the secret word with the * character. initUnknown(word, unknown); // welcome the user cout << "\n\nWelcome to hangman...Guess a country Name"; cout << "\n\nEach letter is represented...

STUDENT-REPORT-CARD-PROJECT

//*************************************************************** //                   HEADER FILE USED IN PROJECT //**************************************************************** #include<fstream.h> #include<iomanip.h> #include<stdio.h> #include<conio.h> //*************************************************************** //                   CLASS USED IN PROJECT //**************************************************************** class student { int rollno; char name[50]; int p_marks, c_marks, m_marks, e_marks, cs_marks; float per; char grade; void calculate(); //function to calculate grade public: void getdata(); //function to accept data from user void showdata(); //function to show data on screen void show_tabular(); int retrollno(); }; //class ends here void student::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_mark...

BANK-MANAGEMENT-SYSTEM

//*************************************************************** //                   HEADER FILE USED IN PROJECT //**************************************************************** #include<fstream.h> #include<ctype.h> #include<iomanip.h> #include<conio.h> #include<stdio.h> //*************************************************************** //                   CLASS USED IN PROJECT //**************************************************************** class account { int acno; char name[50]; int deposit; char type; public: void create_account(); //function to get data from user void show_account(); //function to show data on screen void modify();   //function to get new data from user void dep(int); //function to accept amount and add to balance amount void draw(int); //function to accept amount and subtract from balance amoun...

Program to Merge Two Double Linked List

#include<iostream> using namespace std; class Node { public: int data; Node *next; Node *prev; Node() { data=0; next=prev=NULL; } }; class Node1 { public: int data; Node1 *next; Node1 *prev; Node1() { data=0; next=prev=NULL; } }; class Node2 { public: int data; Node2 *next; Node2 *prev; Node2() { data=0; next=prev=NULL; } }; class DoublyLinkedList { private: Node *headNode, *tailnode; Node1 *headNode1, *tailNode1; Node2 *headNode2, *tailNode2; public: DoublyLinkedList() { headNode=tailNode=NULL; headNode1=tailNode1=NULL; headNode2=tailNode2=NULL; } void Insert();//Insert data into the two lists void Merge() ;//Merging two lists into one void Display();//Display only the merged list }; void DoublyLinkedList::Insert() { char option; //This section inserts elements into the nodes of the first list do { Node *newnode = new Node(); cin>>newnode->data; newnode->next=NULL; newnode->prev=NULL; if(headNode==...

Program to implement NEWTON'S FORWARD METHOD OF INTEROLATION.

    #include<stdio.h> #include<conio.h> #include<math.h> #include<process.h> #include<conio.h> void main() { int n;                          // no. of terms. int i,j;                        // Loop variables float ax[10];                   // 'X' array limit 9 float ay[10];                   // 'Y' array limit 9 float x;                        // User Query for what value of X float y=0;                      // Calculated value for coressponding X. float h;                        // Calc. Section float p;            ...

Program to print the armstrong numbers

Program to print the armstrong numbers /* If sum of cubes of each digit of the number is equal to the number itself,  then the number is called an Armstrong number. For example, 153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 )  + ( 3 * 3 * 3 )*/ //______________Including Header Files______________ #include<stdio.h> #include<conio.h> //_________Mainly included for the getch() function______________ int main() { int number = 0, counter = 0, remainder = 0, number_cube = 0; //_____Variable declaration and Initialization_____ printf("\n\n ______ Program will print Armstrong numbers between 1 and 500 ______"); printf("\n\n\t\t ARMSTRONG NUMBERS - "); for( counter = 0; counter <= 500; counter++) { number = counter; //__________Copying the number to be checked in another variable so that value of counter does not change during digit extraction________ number_cube = 0; //__________Setting the sum of the cube of digits to 0____________ /* Wh...

Program will calculate the factorial of a given number (No Validation included)

Program will calculate the factorial of a given number (No Validation included) //____________________Include Header Files_________________ #include<stdio.h> //________Header Files are also known as Preprocessor directives____________ #include<conio.h> //________Mainly for the getch function included in program_________________ int main() //___________This is from where the execution starts_____________________ { int number, factorial, temp; //____________Variable Declaration_____________ factorial = 1; //___________Initializing the number to 1 which will store the factorial of a given number__________ printf("\n\t\t\t_______Factorial of a Number_______"); printf("\n\n\t Enter the Number - "); //____________Prompting the user to enter the number for which to calculate scanf("%d", &number); //_________Reading the user input and storing the input in variable number_________ for(temp = number ; temp >= 1; temp --) { factor...

Program will calculate the profit and loss based on selling price and cost price

‎ Prog ram will calculate the profit and loss based on selling price and cost price /* The user of the system will input the Cost Price and Selling Price of an item and based on the input the program will calculate whether the shopkeeper had made a profit or loss If Selling Price - Cost Price > 0 Profit is dere If Selling Price - Cost Price = 0 No Profit No Loss situation If Selling Price - Cost Price < 0 Loss has incurred */ //_______________Include Header Files______________ #include<stdio.h> #include<conio.h> //___________Mainly included for the getch() function___________________ int main() //___________Main is the fucntion from where the program execution starts_______________ { float cost_price = 0, selling_price = 0; //___________Variable Declaration and Initialization___________ double pro_loss = 0; printf("\n\n\t __________Program will calculate Profit or Loss__________"); printf("\n\n\n Enter the Cost Price - $ ...