-3
#include <stdio.h>
int main(void)
{
    char fever, cough;

    printf("Are you running a fever? (y/n)\n");
    scanf("%c",&fever);

    printf("Do you have a runny nose/cough? (y/n)\n");
    scanf(" %c",&cough);

    printf("Please verify the folling information.\nFever: %c \nRunny nose/cough: %c \n,fever,cough");
return 0;
}

When I run this I get: 12:2 warning:format '%c' expects a matching 'int' argument [-Wformat]

What do I need to change? I know everything is systematically correct, I just need to use something else, and I can't find anything that specifically fixes my problem!

Thanks guys.

J T
  • 23
  • 1
  • 1
  • 1

4 Answers4

1
printf("Please verify the folling information.\nFever: %c \nRunny nose/cough: %c \n,fever,cough");    

Above statement is systematically incorrect. Misplaced " .

MODIFY Like this

printf("Please verify the folling information.\n Fever: %c \nRunny nose/cough: %c \n ",fever,cough);   
Gangadhar
  • 10,248
  • 3
  • 31
  • 50
0

Badly placed close quote. Change \n,fever,cough" to \n",fever,cough

DrC
  • 7,528
  • 1
  • 22
  • 37
0

You are not placing the ending " quote correctly

printf("Please verify the folling information.\nFever: %c \nRunny nose/cough: %c   \n",fever,cough);
                                                                                     ^ Close your quote here
P0W
  • 46,614
  • 9
  • 72
  • 119
0

You aren't passing the fever or cough parameters to printf. Just add fever and cough as parameters to printf function. Quote should be after text but before variables.

Angus Comber
  • 9,316
  • 14
  • 59
  • 107