C examples for Language Basics:Hello World
Converts 2 fathoms to feet
#include <stdio.h> int main(void) { int feet, fathoms; /* w w w.jav a 2 s.com*/ fathoms = 2; feet = 6 * fathoms; printf("There are %d feet in %d fathoms!\n", feet, fathoms); printf("Yes, I said %d feet!\n", 6 * fathoms); return 0; }