Working With Integers in C


  1. Add two Numbers


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int no1,no2,tot;

    printf("Enter Number 1\n");
    scanf("%d",&no1);

    printf("Enter Number 2\n");
    scanf("%d",&no2);
    tot=no1+no2;

    printf("The Total Is %d\n",tot);
    return 0;
}

No comments:

Post a Comment