#include <stdio.h>
int main() {
printf("Temperature converter\nType \"Celsius\" to convert from farenheit to celsius or \"farenheit\" to convert from celsius fo farenheit\n");
char type[25];
scanf("%s", &type);
if (type == 'Celsius') {
printf("Type how many degrees to convert to farenheit");
int degrees;
scanf("%d", °rees);
printf("%dF", (degrees * 9 / 5)+32);
}
}```
How can I compare if type is "Celsius"
#Compare strings
4 messages · Page 1 of 1 (latest)