Hi guys,
I was wondering if anyone could help me out. I just started with this book c programming for the absolute beginner and i just created a simpel arithmetic program as one of the excersizes in the book. The main code executes fine only the last print statement which sums up the results of the formula does not.
Code:
#include <stdio.h>int main()
//This is a simpel c arithmetic program//
{
int iNum1 = 0;
int iNum2 = 0;
int iNum3 = 0;
int iNum4 = 0;
int iResult = (Inum1 - Inum2) * (Inum3-Inum4);
printf("\nadd a number please ");
scanf("%d" , &iNum1);
printf("\nEnter another number please ");
scanf("%d" , &iNum2);
printf("\nDon't get ........ed, but another one ");
scanf("%d" , &iNum3);
printf("\nand the last one ");
scanf("%d\n" , &iNum4);
printf("the formularesult is%d" , iResult);
return 0;
}