Friday, August 20, 2010

How to...with Dev-C++?

when you compile and run the program and that command prompt window thingy pops up what is the program to make it add and subtract decimals?How to...with Dev-C++?
will uplz clear the questionHow to...with Dev-C++?
is this a legit question?.. this is so basic.. i think this is your homework, am i right?.. :p





include %26lt;stdio.h%26gt;





int main()


{


int a1=0, a2=0, s1=0, s2=0;





printf(';enter 2 values to add: ';);


scanf(';%d %d';, %26amp;a1, %26amp;a2);





printf(';the sum: %d';, a1+a2);





printf(';enter 2 values to subtrac: ';);


scanf(';%d %d';, %26amp;s1, %26amp;s2);





printf(';the difference: %d';, s1-s2);





printf(';end of program, noOb!';);








return 0;


}

No comments:

Post a Comment