We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Conditional Statements in C
Conditional Statements in C
Sort by
recency
|
532 Discussions
|
Please Login in order to post a comment
include
include
include
include
include
include
include
include
include
char* readline();
int main() { char* n_endptr; char* n_str = readline(); int n = strtol(n_str, &n_endptr, 10);
}
char* readline() { size_t alloc_length = 1024; size_t data_length = 0; char* data = malloc(alloc_length);
}
include
int main(){ int n; scanf( "%d",&n); if(n == 1 ){ printf( "one"); } else if(n == 2){ printf( "two"); } else if(n == 3){ printf( "three"); } else if(n == 4){ printf( "four"); } else if(n == 5){ printf( "five"); } else if(n == 6){ printf( "six"); } else if(n == 7){ printf( "seven"); } else if(n == 8 ){ printf( "eight"); } else { printf("Greater than 9"); }
include
int main() { int x = 0;
}
Using Ternary Operator