Write A C++ Program To Input A Number Between 20 To 99 And
Display Its Numbername?
Answer Posted / pavan mustyala
#include<iostream>
using namespace std;
void main()
{
char *arr1[9]=
{"one","two","three","four","five","six","seven","eight","ni
ne"};
char *arr2[8]=
{"twenty","thirty","fourty","fifty","sixty","seventy","eight
y","ninety"};
int num;
cout << "Enter A Number:"<< endl;
cin >> num;
cout << arr2[(num / 10) - 2];
if((num % 10) != 0)
cout << " " << arr1[(num % 10) -1];
}
Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
A suduco given & u hv 2 check if it is incomplete(blanks left),or correct or incorrect
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?
Write a simple encryption program using string function which apply the substitution method.
write a program to perform generic sort in arrays?
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?
How can I Draw an ellipse in 3d space and color it by using graph3d?
i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.
write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150
Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++
Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).
How to Split Strings with Regex in Managed C++ Applications?
write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.
Code for Two Classes for Doing Gzip in Memory?
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n