Pages

Wednesday, October 20, 2010

SUM

#include<stdio.h>
#include<conio.h>

void main()
{
    int m, a, sum;

    clrscr();
    printf("\n\tEnter the value of m:^");
    scanf("%d",&m);
    printf("\n\tEnter the value of a:^");
    scanf("%d",&a);

    sum =m+a;

    if(sum>=0)
        printf("\n\t\tThe sum of %d and %d = %d",m,a,sum);
    getch();
}

No comments:

Post a Comment