hi
i have been doing a few tutorials teaching my self c, i have tried to experiment with one of the exercises i have done but the out come isnt what i want. this is my source code:
Code:
#include <stdio.h>
main ()
{
int total;
int a,b;
printf("enter number:" ,&a);
scanf("%d");
printf("enter 2nd number:" ,&b);
scanf("%d");
total = a + b;
printf(" the number is %d " ,total );
getchar();
return 0;
}
i want the the program so i can enter 2 numbers and it to display the sum of those two numbers. what is hapenning when i execute the program tho is, i can enter the two numbers but after that, the cmd prompt screen disappears.
can any one help me??
also any good links to web sites with more exercise to do wud be appreciated
thanks
munch114