I run the C program and I get the following errors.
4:20: error: too few arguments to function call, at least argument 'format' must be specified int x= get_int();
/usr/include/cs50.h:82:1: note: 'get_int' declared here int get_int(const char *format, ...)__attribute__((format(printf, 1, 2)));
7:20: error: too few arguments to function call, at least argument 'format' must be specified
int x= get_int();
/usr/include/cs50.h:82:1: note: 'get_int' declared here int get_int(const char *format, ...) attribute((format(printf, 1, 2)));
Here's the code
#include <cs50.h>
int main(void){
int x= get_int();
switch(x)
{
int x= get_int();
case1:
printf("One!\n");
break;
case2:
printf("Two!\n");
break;
case3:
printf("Three!\n");
break;
default:
printf("Sorry!\n");
}
}
I'm aware the CS50 manual says about get_string:
#include <cs50.h>
char *get_string (const char *format, ...);
But, I'm still not sure if this information helps in my example.