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

Popular posts from this blog

Binary Search, Linear Search, Selection Sort and Bubble sort Python Menu Program

Housie/Tambola using Python with Tickets in PDF file

100% Working C++ Tambola/Housie Code with 90 Unique Numbers