- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 1
- Downvoting Members
- 3
Create a c++ program that would translate words to numbers using if, else and switch statements only. The maximum number to be inputted is 999999999. All numbers should be integers. Those are the conditions. Help please? :) |
|
Here's my code for the upright triangle. Now I'm hard up on doing the code for inverted triangle, I'm working on it right now, but a little help would be great. [CODE]#include <iostream.h> #include <conio.h> void main() { int len,ht,ch,cho,sz,col=20,ctr=1; cout<<"\nTRIANGLE"; cout<<"\nEnter Size: "; cin>>sz; if (sz<5||sz>20) cout<<"Size must be … |
|
[CODE]if(num/100>=1) { x=num/100; switch(x) { case 1: cout<<"one hundred "; break; case 2: cout<<"two hundred "; break; case 3: cout<<"three hundred "; break; case 4: cout<<"four hundred "; break; case 5: cout<<"five hundred "; break; case 6: cout<<"six hundred "; break; case 7: cout<<"seven hundred "; break; case 8: cout<<"eight … |