addition

hi..someone please tell me what's wrong with my program?!and what to do with this?..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
#include <stdlib.h>

int main ()
{   int integer1, integer2, sum;
    printf("Enter first integer\n");
    scanf("%d", & integer1);
    printf("Enter second integer\n");
    scanf("%d", & integer2);
    printf("sum is\n");
    sum = integer1 + integer2;
    system("PAUSE");
    return 0;
}

you just don't print the sum

instead of
1
2
    printf("sum is\n");
    sum = integer1 + integer2;
write
1
2
    sum = integer1 + integer2;
    printf("sum is %d\n", sum);
Last edited on
thanks....XD
Topic archived. No new replies allowed.