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.
- Prepare
- C++
- Introduction
- Conditional Statements
- Discussions
Conditional Statements
Conditional Statements
Sort by
recency
|
824 Discussions
|
Please Login in order to post a comment
This code can't run in hackerrank but it run in codeblock and online compiler with same output.plz someone solve this if i am wrong.
using namespace std;
int main() { int n; cout << "Enter any n: "; cin >> n;
}
include
using namespace std; int main (){ int n ;
cin>> n ;
if (n==1) { cout << "one"; }
else if (n==2) { cout << "two"; }
else if (n==3) { cout << "three"; }
else if (n==4) { cout << "four"; }
else if (n==5) { cout << "five"; }
else if (n==6) { cout << "six";
}
else if (n==7) { cout << "seven"; }
else if (n==8) { cout << "eight"; }
else if (n==9) { cout << "nine"; }
else if ( n >9 ) { cout <<"Greater than 9";
}
}
string nums[] = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
include
using namespace std;
string ltrim(const string &); string rtrim(const string &);
int main() { string n_temp; getline(cin, n_temp);
}
string ltrim(const string &str) { string s(str);
}
string rtrim(const string &str) { string s(str);
}