C++ Program For Guessing Number in Mind
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
float n,ans,a;
cout<<"\t\t\t\tMIND READING TRICK!!!\n";
cout<<"Enter your number between 1-10 :";
cin>>n;
cout<<"Follow these steps now \n";
cout<<"Add 2 \n";
cout<<"Multiply it by 2 \n";
cout<<"Subtract 2 from it \n";
cout<<"Divide it by 2 \n";
cout<<"Subtract ur original number from it \n";
n=a;
ans=(a+2*2-2)/2-n;
cout<<"Number left with you is ";
cout<<ans<<endl;
return 0;
}
Comments
Post a Comment