Computers and Technology, 07.05.2021 16:00 stalley1521
My code here is written to write a two-digit number in words, everything works as intended except when I enter the number 10-19, it will do what it is supposed to but then print the word for a number in the 20s. It would be greatly appreciated if you could take a look at the code
```
#include
#include
using namespace std;
int main() {
int number, first, second;
cout<<"Enter a two digit number:";
cin>>number;
first=floor(number/10);
second=floor(number%10);
switch(first){
case 1: switch(second){
case 0:cout<<"The number entered is ten";break;
case 1:cout<<"The number entered is eleven";break;
case 2:cout<<"The number entered is twelve";break;
case 3:cout<<"The number entered is thirteen";break;
case 4:cout<<"The number entered is fourteen";break;
case 5:cout<<"The number entered is fifteen";break;
case 6:cout<<"The number entered is sixteen";break;
case 7:cout<<"The number entered is seventeen";break;
case 8:cout<<"The number entered is eighteen";break;
case 9:cout<<"The number entered is ninteen";break;
return 0;
}
case 2:cout<<"The number entered is twenty";break;
case 3:cout<<"The number entered is thirty";break;
case 4:cout<<"The number entered is fourty";break;
case 5:cout<<"The number entered is fifty";break;
case 6:cout<<"The number entered is sixty";break;
case 7:cout<<"The number entered is seventy";break;
case 8:cout<<"The number entered is eighty";break;
case 9:cout<<"The number entered is nintey";break;
}
switch(second) {
case 0: break;
case 1:cout<<"-one";break;
case 2:cout<<"-two";break;
case 3:cout<<"-three";break;
case 4:cout<<"-four";break;
case 5:cout<<"-five";break;
case 6:cout<<"-six";break;
case 7:cout<<"-seven";break;
case 8:cout<<"-eight";break;
case 9:cout<<"-nine";break;
}
return 0;
}
Answers: 1
Computers and Technology, 22.06.2019 22:30
Which of the following factors would your hypothetical supervisor look at when deciding whether to test a biological material sample for dna? the amount of other evidence you have implicating a suspect in a crime the annual budget for the crime lab both of the above none of the above; you would almost always order a test
Answers: 3
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
My code here is written to write a two-digit number in words, everything works as intended except wh...
Mathematics, 05.12.2020 16:00
Social Studies, 05.12.2020 16:00
Mathematics, 05.12.2020 16:00
Mathematics, 05.12.2020 16:00
Mathematics, 05.12.2020 16:00
English, 05.12.2020 16:00
Social Studies, 05.12.2020 16:00
Mathematics, 05.12.2020 16:00
Mathematics, 05.12.2020 16:00
Mathematics, 05.12.2020 16:00
Biology, 05.12.2020 16:00
Business, 05.12.2020 16:00