All pastes #619696 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-14 23:11 UTC
rendered paste body
#include <stdio.h>
int main() {
	//declare variables
	int userTemp;
	float fConv;
	char cSelection;

	printf("Please select an option form the following menu:\
			\n\n\t\tA. Fahrenheit to Centigrade\
			\n\t\tB. Centigrade to Fahrenheit\
			\n\t\tC. Exit\n\t\t\tSelect A/B/C> ");

	scanf("%c", &cSelection);

	if(cSelection == 'A' || 'a') {
		printf("Enter the degrees in Fahrenheit: ");
		scanf("%d", &userTemp);
		fConv = userTemp * 1.8f + 32;
	} else {
		if(cSelection == 'B' || 'b') {
			printf("Enter the degrees in Centigrade: ");
			scanf("%d", &userTemp);
			fConv = (userTemp - 32) / 1.8f;
		} else {
			if(cSelection == 'C' || 'c') {
				printf("exiting....\n\n");
				return 1;
			}
		}
	}

	printf("%d = %.0f\n", userTemp, fConv);

	return 0;
}