Adding 2 user specified numbers.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonniethecodeprince
    New Member
    • Mar 2007
    • 35

    Adding 2 user specified numbers.

    Howdy, Looking for some help with a simple program. What do I need for a program to calculate the sum of 2 given numbers by the user.

    [CODE=c]#include<stdio. h>

    int main()

    {
    int a, b, sum;

    printf("Input first integer : %s \n\n", a);

    printf("Input Second integer :%s \n\n", b);

    printf("The sum of the 2 values is : %sum");
    sum = a + b;

    return(0);

    }


    [/CODE]
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You need to get the integers from the user.

    Comment

    Working...