Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Assignment 5

Language: Layout:
+ ] Compiler args - ] Show input
Compilation time: 0.13 sec, absolute service time: 0,21 sec 
edit mode |  history  | discussion
Error(s):
source_file.c: In function ‘main’:
source_file.c:12:8: error: expected ‘(’ before ‘else’
     if else(gallon <= 60)
        ^
source_file.c:28:12: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]
     printf("Dear %s,\n", name); 
            ^
source_file.c:29:43: error: expected expression before ‘%’ token
     printf("The price in total is %lf\n", %gallonPrice);
                                           ^
source_file.c:6:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", &name);
     ^