Skip to main content

Posts

Showing posts with the label If else

Conditional Statements in C Hackerrank Solution - C Language

 Conditional Statements in C Hackerrank Solution - C Language Code: #include   < assert.h > #include   < limits.h > #include   < math.h > #include   < stdbool.h > #include   < stddef.h > #include   < stdint.h > #include   < stdio.h > #include   < stdlib.h > #include   < string.h > char * readline(); int  main() {      char * n_endptr;      char * n_str = readline();      int  n = strtol(n_str, &n_endptr,  10 );      if  (n_endptr == n_str || *n_endptr !=  ' \ 0 ' ) { exit(EXIT_FAILURE); }      // Write Your Code Here      if (n== 1 ){         printf( "one" );     } else   if (...