All pastes #421537 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-02 21:50 UTC
rendered paste body
#include <stdio.h>

int main() //no need for ; after int main()
{
	int kmh; //kmh is a number
       //moved kmhtomph inside main no need to put them outside
	int kmhtomph; 
	printf("%s\n","Enter kmh: "); // the first parameter of printf is a format string
	scanf("%d",&kmh); //kmh is a number!!! treat it as one
	kmhtomph = kmh * 0.6213712; //added ; at the end of line
	printf("MPH is %d", kmhtomph); //you want to print the kmhtomph not kmh
	return (0);
}