Write a program that take two integers from the user and print the results of this equation:
Result = ((num1 + num2) * 3) – 10
#include <stdio.h>
int main() {
int num1, num2, result;
printf("Please enter an integer: ");
scanf("%d", &num1);
printf("Please enter an integer: ");
scanf("%d", &num2);
result = ((num1 + num2)*3) - 10;
printf("The result is %d\n", result);
return 0;
}
Comments
Leave a comment