help me fix this
28(line) - [Error] expected expression before ')' tokenunknown
c_cpp
4 years ago
742 B
11
Indexable
#include <stdio.h>
#define THIRTY_TWO 32
#define ONE_POINT_EIGHT 1.8
int main()
{
float f,c, cal;
char ui;
printf("This program converts Degree celsius to Fahrenheit and vice versa\n");
printf("Enter 'F' to convert F-C / Enter 'C' to convert C-F");
scanf("%c", ui);
if(ui == 'F' || 'f')
{
printf("Enter the temp that is to be converted to Degree celsius:");
scanf("%f", &f);
cal = (f-THIRTY_TWO/ONE_POINT_EIGHT);
printf("Temp is: %f°", &cal);
}
if(ui == 'C' || 'c')
{
printf("Enter the temp that is to be converted to Fahrenheit:");
scanf("%f", &c);
cal = ((c*ONE_POINT_EIGHT)+THIRTY_TWO);
printf("Output is: %f°F", &cal);
}
else()
{
printf("Please enter a valid value");
return 0;
}
}Editor is loading...