Demonstrates printing the results of simple equations : Printf « Console « C / ANSI-C






Demonstrates printing the results of simple equations

       
#include <stdio.h>


int main()
{
    int term = 3 * 5;
    printf("Twice %d is %d\n", term, 2*term);
    printf("Three times %d is %d\n", term, 3*term);
    return (0);
}


           
       








Related examples in the same category

1.Displaying printable charactersDisplaying printable characters
2.Displaying printable characters plus whitspace namesDisplaying printable characters plus whitspace names
3.printf usage
4.Prints 3 characters forward and backward to demonstrate character printingPrints 3 characters forward and backward to demonstrate character printing
5.Return value from printf