Skip to main content

Posts

Showing posts with the label TAKE CHALLENGE

Program To Input The Flight Details and Print It

#include<iostream.h> #include<conio.h> class flight { public: int flight; char destination; int distance; public : void flight::feeddata(void) { cout<<"enter the flight no.:"; cin>>flight; cout<<"enter the destination:"; cin>>destination; cout<<"enter the distance:"; cin>>distance; } void flight::showdata(void) { cout<<"the flight no. is:"<<flight; cout<<"the flight will go to:"<<destination; cout<<"the distance is:"<<distance; } }; void main() { clrscr(); flight plane; plane.feeddata(); plane.showdata(); getch(); }

WELCOME TO THE GREAT BHAVAN'S QUIZ COMPETITION !!!

Program Created By :- Arindam Bera   ------------------------------------------------------------------------------------------------------------- #include<iostream.h> #include<string.h>                                                                                        //header files #include<stdio.h> void main () { int aa=0,ab=0,ac=0,ad=0,ba=0,bb=0,bc=0,bd=0,ax,bx,ca=0,wa=0,pa=0,cb=0,wb=0,pb=0;                          //variables declared char x[100],a[100],b[100],y; abc: cout<<"******************************************************************************"<<endl; cout<<"             WELCOME TO THE GREA...

Guessing Game

The following program will act as a guessing game in which the user has eight tries to guess a randomly generated number. The program will tell the user each time whether he guessed high or low: #include <stdlib.h> #include <iostream> using namespace std; int main() { int number=rand()___; int guess=-1; int trycount=0; while(guess__number __ trycount<8) { cout__"Please enter a guess: "; cin__guess; __(guess_number) cout<<"Too low"<<endl;  __(guess_number) cout<<"Too high"<<endl; _______________; _ if(guess==number) cout<<"You guessed the number"; ____ cout<<"Sorry, the number was: "<<_____; ______ 0; _ Posted By :- Cplusplusprogramming

Array Challenge

When completed, the following program should first fill in (by asking the user for input) and then list all the elements in an array: #include <_____>             using namespace std;       ___ main() {   int array[8]___   for(int x=_; x<_; ___)   cin>>______;   for(____; x<____; ___)   cout<<_____;   return __; ____ Posted By :- Cplusplusprogramming