All pastes #2047381 Raw Edit

Unnamed

public text v1 · immutable
#2047381 ·published 2011-04-17 07:48 UTC
rendered paste body
#include <stdio.h>
//This is my first test program. It will be silly.
int main(void)
    {
        int x;
        int y;
        int a;
        int b;
        int sum1;
        int sum2;

        printf("This program will take two sums taken from \n two numbers each and compare them. \n");

        printf("Enter a number: ");
        scanf("%d", &x);

        printf("Enter a number: ");
        scanf("%d", &y);

        printf("Enter a number: ");
        scanf("%d", &a);

        printf("Enter a number: ");
        scanf("%d", &b);

        sum1 = x + y;
        sum2 = a + b;

        if (sum1 > sum2)
        {
            printf("%d plus %d is greater than %d plus %d",x,y,a,b);
        }
        if (sum1 == sum2)
        {
            printf("%d plus %d is equal to %d plus %d",x,y,a,b);
        }
        if (sum1 < sum2)
        {
            printf("%d plus %d is less than %d plus %d",x,y,a,b);
        }
    return 0;
    }