Do math inside printf() - C Data Type

C examples for Data Type:int

Description

Do math inside printf()

Demo Code

#include <stdio.h>

int main (void)
{
    int answer, result;

    answer = 100;// ww  w  .jav a 2s.com
    result = answer - 10;
    printf ("The result is %i\n", result + 5);

    return 0;
}

Result


Related Tutorials