Write A C++ Program To Input A Number Between 20 To 99 And
Display Its Numbername?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vinay tiwari
#include<iostream.h>
#include<conio.h>
void main()
{
char a[9][10]=
{"one","two","three","four","five","six","seven","eight","ni
ne"};
char b[8][10]=
{"twenty","thirty","fourty","fifty","sixty","seventy","eight
y","ninety"};
int num,rem;
clrscr();
cout<<"enter number "<<"\n";
cin>>num;
rem=num%10;
num=num/10;
if(rem==0)
cout<<b[num-2]<<"\n";
else
cout<<b[num-2]<<" "<<a[rem-1];
getch();
}
| Is This Answer Correct ? | 18 Yes | 4 No |
#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 |
how to diplay a external image of output on winxp by using c & c++,
A string of charaters were given. Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE OUTPUT: E
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
5 Answers ADP, Amazon, HCL, IBM, Infosys, Satyam, TCS, Vimukti Technologies,
Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 …
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
3 Answers TCS, Vimukti Technologies, Wipro,
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
0 Answers Jomo Kenyatta University,
What will be the output- for(i=1;i<=3;i++) { printf("%d",i); continue; i++; }
output for printf("printf");
write a program that calculate the volume of cylinder after user enters radius and height and show the algorithm used
1 Answers Jomo Kenyatta University,
. Remove all the blank spaces between character.Matrix is of 10* 10. eg: INPUT ------------------------------------ | N | A | | V | |T ------------------------------------- | |G | U | |P | -------------------------------------- |T | | | A | | ------------------------------------ OUTPUT: ------------------------------------ | N | A | V | T | | ------------------------------------- |G |U | P | | | -------------------------------------- |T | A | | | | ------------------------------------
Write a program using one dimensional array that accept five values from the keyboard. Then it should also accept a number to search. This number is to be searched if it among the five input values. If it is found, display the message “Search number is found!” otherwise, display “Search is lost”. Example: Enter 5 numbers: 10 15 20 7 8 Enter number to search: 7 Search number is found!
2 Answers College School Exams Tests,
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!!!)