#include<conio.h> #include<stdio.h> main() {clrscr();float guess, incr; char ch; incr=guess=100; while (incr>1) { printf("\ng or l %0f\n",guess); incr=incr/2; if( (ch=getch())=='e') break; else if (ch=='g') guess=guess+incr; else guess =guess-incr; } printf("\nno is %.0f. ",guess); getch();}
C Program For Guess
January 04, 2015
By:
Bhanu Namikaze
Bhanu Namikaze
Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.
No comments:
Post a Comment