Using Comments in a Program, adds two integer values and displays the result. - C Statement

C examples for Statement:Comments

Description

Using Comments in a Program, adds two integer values and displays the result.

Demo Code

#include <stdio.h>

int main (void)
{
    int value1, value2, sum;

    // Assign values and calculate their sum
    value1 = 50;/*from www .  j  a  v  a2 s  . c  o  m*/
    value2 = 25;
    sum = value1 + value2;

    // Display the result
    printf ("The sum of %i and %i is %i\n", value1, value2, sum);

    return 0;
}

Result


Related Tutorials