float fahrenheit;
float celsius;
float formulaf = (fahrenheit - 32.0) * 5/9;
char str[20];
float formulac = celsius * 9/5 + 32.0;
printf("Choose either fahrenheit or celsius; ");
scanf("%*s", &str);
if (strcmp(str, "fahrenheit") ==0)
{
printf("Enter the temperature in fahrenheit: ");
scanf("%f", &fahrenheit);
printf("%.2f fahrenheit is %.2f celsius", fahrenheit, formulaf);
}
else
{
printf("Enter the temperature in celsius: ");
scanf("%f", &celsius);
printf("%.2f celsius is %.2f fahrenheit", celsius, formulac);
}
I'm coding this in xcode, I have created the headers and everything, this is the main part where I am stuck, it gives an error in the following code and it gives breakpoints in some other lines, please help me solve this
scanf("%*s", &s);
-------> data argument not used by format string
what does this mean?