Conditional Statements in C | HackerRank
Problem Link :Conditional Statements in C
Solution :
Develop by Samsus Salehin Sabbir
Solution :
Develop by Samsus Salehin Sabbir
- #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>
- int main()
- {
- int n;
- scanf("%d",&n);
- if(n==0)
- printf("zero\n");
- else if(n==1)
- printf("one\n");
- else if(n==2)
- printf("two\n");
- else if(n==3)
- printf("three\n");
- else if(n==4)
- printf("four\n");
- else if(n==5)
- printf("five\n");
- else if(n==6)
- printf("six\n");
- else if(n==7)
- printf("seven\n");
- else if(n==8)
- printf("eight\n");
- else if(n==9)
- printf("nine\n");
- else
- printf("Greater than 9\n");
- return 0;
- }
No comments