Question 6 || Hacker Rank
Conditional Statements in C || Hacker Rank
Objective
In the event that and else are two of the most often utilized conditionals in C/C++, and they empower you to execute zero or one restrictive explanation among numerous ward restrictive articulations. We use them in the accompanying ways:
on the off chance that: This executes the collection of organized code beginning with if assesses to valid.
if (condition) {
statement1;
...
}
if - else: This executes the assortment of organized code beginning with if assesses to valid, or it executes the assemblage of code beginning with if assesses to bogus. Note that only one of the organized code segments will at any point be executed.
in the event that (condition) {
statement1;
...
}
else {
statement2;
...
}
in the event that - else if - else: In this construction, subordinate proclamations are binded together and the for every assertion is possibly checked assuming all earlier circumstances in the chain are assessed to misleading. Once an assesses to valid, the organized code related with that assertion is executed and the program then, at that point, jumps to the furthest limit of the chain of explanations and executes. In the event that each in the chain assesses to misleading, the assemblage of organized code in the else block toward the end is executed.
if(first condition) {
...
}
else if(second condition) {
...
}
.
.
.
else if((n-1)'th condition) {
....
}
else {
...
}
Task
Given a positive number meaning , do the accompanying:
In the event that , print the lowercase English word comparing to the number (e.g., one for , two for , and so on.).
If , print More noteworthy than 9.
Input Arrangement
The main line contains a solitary whole number, .
i.e., 1 is less than equal to n maore than equals to 10 to power 9
Imperatives
Yield Configuration
On the off chance that ,, print the lowercase English word relating to the number (e.g., one for , two for , and so on); in any case, print More prominent than 9 all things being equal.
Test Information
5
Test Result
five
Test Information #01
8
Test Result #01
eight
Test Information #02
44
Test Result #02
More noteworthy than 9
0 Comments