I;m having a hell of a time this simple program im trying to create... any help would be great! most of it is right except can't get the formula to show up so theres an extra line of code in there because i dont know what to do
this is what I have to get this to do...
Hello World! My name is Your Name.
Enter four numbers in the format nnn nnn nnn nnn <enter>: 18 4 67 5
((18 / 4) + 67) * 5 = 355
The Average of the input numbers is: 23.5
Have a nice day!
{
int num1;
int num2;
int num3;
int num4;
int result;
float average;
printf("Hello World! My name is \n\n");
printf("Enter four numbers in the format nnn nnn nnn nnn <enter>:\n\n");
scanf("%d %d %d %d" , &num1, &num2, &num3, &num4);
result = ((num1 / num2) + num3) * num4;
printf("((num1 / num2) + num3) * num4 is %d\n\n", ((num1 / num2) + num3) * num4);
printf("((%d / %d) + %d) * %d is %d\n\n"), num1, num2, num3, num4, result;
average =(num1 + num2 + num3 + num4)/4;
printf("The Average of the input numbers is: %.1f\n\n" , average);
printf("adios!\n\n");
return 0;
} // main