Write A C++ Program To Input A Number Between 20 To 99 And
Display Its Numbername?
Answer Posted / sudha
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
string p[] =
{ "","","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety" };
string o[] = { "","one", "two", "three", "four",
"five", "six", "seven", "eight", "nine" };
cout << "\n\nEnter a number between 20 to 99\n";
cin >> n;
i=n/10;
j=n%10;
cout << p[i] <<" " << o[j] << endl;
getch();
return(0);
}
| Is This Answer Correct ? | 24 Yes | 6 No |
Post New Answer View All Answers
write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
How to swap two ASCII numbers?
write a program to perform generic sort in arrays?
how to write a program that opens a file and display in reverse order?
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?
can you please write a program for deadlock that can detect deadlock and to prevent deadlock.
what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }
Code for Method of Handling Factorials of Any Size?
how to diplay a external image of output on winxp by using c & c++,
3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...
Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?