It looks like you're new here. If you want to get involved, click one of these buttons!
+ Plus
- Minus
* Times
/ Divided by
#include <stdio.h>
//Don't forget the standard header file
int main()
{
int answer = 2 + 2; /*Declaring integer answer as 2 plus 2*/
printf(\"Two plus two equals %i\n\", answer);
return(0);
}
Two plus two equals 4
#include <stdio.h>
int main()
{
int one = 14; //first number
int two = 30; //second number
printf(\"The two numbers added are %i\n\", one + two);
printf(\"The two numbers subtracted are %i\n\", one - two);
printf(\"The two numbers multiplied are %i\n\", one * two);
printf(\"The two numbers divided are %i\n\", one / two);
return(0);
}