Posts

Showing posts from July, 2023

Hacker rank Challenges #006

  Task For each integer   in the interval   (given as input) : If  , then print the English representation of it in lowercase. That is "one" for  , "two" for  , and so on. Else if   and it is an even number, then print "even". Else if   and it is an odd number, then print "odd". Input Format The first line contains an integer,  . The seond line contains an integer,  . Constraints Output Format Print the appropriate English representation, even , or  odd , based on the conditions described in the 'task' section. Note:   Sample Input 8 11 Sample Output eight nine even odd Source Code : #include   < stdio.h > #include   < string.h > #include   < math.h > #include   < stdlib.h > void  cal(n){      if  (n== 1 ){         printf( "one" );     } else   if  (n== 2 ){  ...

Hacker Rank C Challenges #003

  Task Given a positive integer denoting  , do the following: If  , print the lowercase English word corresponding to the number (e.g.,  one  for  ,  two  for  , etc.). If  , print  Greater than 9 . Input Format The first line contains a single integer,  . Constraints Output Format If  , then print the lowercase English word corresponding to the number (e.g.,  one  for  ,  two  for  , etc.); otherwise, print  Greater than 9  instead. Sample Input 5 Sample Output five Sample Input #01 8 Sample Output #01 eight Sample Input #02 44 Sample Output #02 Greater than 9 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 *...