Quote:

The amount of happiness that you have depends on the amount of freedom you have in your heart

Tuesday, 25 October 2011

Check the correct number

C++ code to check the Correct Number

#include <iostream.h>
int main()
// This is a small program to check correct number

{

int x;
x=0;
cout<<"\n enter nmber \t"<<endl;
cin>>x;

if (x==11){
cout<<"\n correct" <<endl;

cout<<"\n\t This prog is written by Muhammad Farrukh 'muhammadfarrukh149@gmail.com'"<<endl;
cout<<"\n\t\t hahaha..........magar mujhy C++ nhi ati "<<endl;
}

else{
if (x!=11|x<10){

cout<<"\n invalid and number is less than 10" <<endl;
cout<<"\n\t Correct Number is 11 "<<endl;


}
}



1 comment:

  1. Copy the code and past it into Dev C++. then compile and enjoy.;)

    ReplyDelete

“You can't change the past, but you can ruin the present by worrying about the future”