C examples for Language Basics:Hello World
Math calculation on the int type
#include <stdio.h> int main(void){ int n, n2, n3; //w ww .j av a 2 s .c o m n = 5; n2 = n * n; n3 = n2 * n2; printf("n = %d, n squared = %d, n cubed = %d\n", n, n2, n3); return 0; }