C++ projects

C++ Program – Find the 2 largest number from the given set of numbers

May 9, 2011

//Downloaded From theonlinetutorials.com #include<iostream.h> #include<conio.h> int main() { int a[1000],n,max,max1; cout<<”How many no you will input”<<endl; cin>>n; for(int i=0;i<n;i++) { cin>>a[i]; } //Escape When two input are not avaliable if(n<=1) { cout<<”Maximu two No are”<<endl; for(int i=0;i<n;i++) { cout<<a[n]<<endl; } return 0; } //store maximu value between a[0] and a[1] max=a[0]>a[1]?a[0]:a[1]; max1=a[0]<a[1]?a[0]:a[1]; for(i=2;i<n;i++) { if(a[i]>max1) [...]

Read the full article →

C++ Program – Fee Slip Management System

May 4, 2011

//Downloaded From theonlinetutorials.com //PROJECT SCHOOL FEE ENQUIRY #include<iostream.h> #include <fstream.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <conio.h> #include <dos.h> #include <iomanip.h> int i,j,li,lp,rec,valid; void help(); //**************************** ***************************** //                GLOBAL VARIABLE DECLARATIONS //**************************** ***************************** //int i,j,li,lp; char ch,choice; //**************************** ***************************** // THIS CLASS DRAWS LINES, BOXES, ETC. //**************************** ****************************** class DRAW { public [...]

Read the full article →

C++ Program – Supermarket billing

May 1, 2011

//Downloaded From theonlinetutorials.com //program for creating bill in a supermarket #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> #include<stdio.h> #include<stdlib.h> #include<iomanip.h> //global variable declaration int k=7,r=0,flag=0; struct date {int mm,dd,yy;}; ofstream fout; ifstream fin; class item {int itemno; char name[25]; date d; public: void add() {cout<<”\n\n\tItem No: “; cin>>itemno; cout<<”\n\n\tName of the item: “; gets(name); cout<<”\n\n\tManufacturing Date(dd-mm-yy): “; cin>>d.mm>>d.dd>>d.yy; [...]

Read the full article →

C++ Program – Snake Game

May 1, 2011

//Downloaded From theonlinetutorials.com //C++ program – Snake Game #include<stdlib.h> #include<ctype.h> #include<conio.h> #include<stdio.h> #include<time.h> #include<dos.h> #define ESC 27 #define UPARR 72 #define LEFTARR 75 #define DOWNARR 80 #define RIGHTARR 77 #define SAVE 60 #define LOAD 61 main() { void starting(void); void make_xy(char **,char **); void getrand(char *,char *,char *,char *,char *,int,char); char getkey(char,char); void savegame(char *,char [...]

Related Posts Plugin for WordPress, Blogger...
Read the full article →