C examples for Operator:Arithmetic Operator
There are 2.54 centimeters to the inch.
#include <stdio.h> int main(void) { float CM_PER_INCH = 2.54; float height;//ww w. j a v a 2 s . c om printf("Enter your height (in inches): "); scanf("%f", &height); printf("You are %f centimeters tall.\n", height * CM_PER_INCH); return 0; }