Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a complete C++ program that can be used to print the ASCII codes of all th

ID: 3783530 • Letter: W

Question


Write a complete C++ program that can be used to print the ASCII codes of all the upper case and lower case vowels. This can be done by using type casting (converting from character constant into integer constant. Write a Program to compute taxes of household income (call it taxable income). The formula for taxes are given as below: If taxable income is less than or equal to 10000, taxes = 0 If > 10000 but less than or equal to 30000, taxes are 10% of (taxable income - 10000) If > 30000 but less than or equal to 60000, taxes are 2000 + 15% of (taxable income -30000) If taxable income is more than 60000, taxes are: 6500 + 20*(taxable income - 60000) Display the taxable income and taxes with suitable title. Must turn in the source code along with results. Attach a flow chart with your program

Explanation / Answer

// C++ code
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <iomanip> // std::setw
#include <time.h> /* time */

using namespace std;


//main fuction
int main()
{

cout << "a: " << int('a') << endl;
cout << "e: " << int('e') << endl;
cout << "i: " << int('i') << endl;
cout << "o: " << int('o') << endl;
cout << "u: " << int('u') << endl;

cout << "A: " << int('A') << endl;
cout << "E: " << int('E') << endl;
cout << "I: " << int('I') << endl;
cout << "O: " << int('O') << endl;
cout << "U: " << int('U') << endl;

return 0;
}

/*
output:

a: 97
e: 101
i: 105
o: 111
u: 117
A: 65
E: 69
I: 73
O: 79
U: 85

*/

// C++ code
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <iomanip> // std::setw
#include <time.h> /* time */

using namespace std;


//main fuction
int main()
{

double income;
double finalIncome;
double taxes;

cout << "Enter income: ";
cin >> income;

if (income <= 10000)
{
taxes = 0;
finalIncome = income;
}
else if (income <= 30000)
{
taxes = 0.1*(income-10000);
finalIncome = income - taxes;
}
else if (income <= 60000)
{
taxes = 2000 + 0.15*(income-30000);
finalIncome = income - taxes;
}
else if (income > 60000)
{
taxes = 6500 + 0.2*(income-60000);
finalIncome = income - taxes;
}

cout << "Final Income: " << finalIncome << endl;
cout << "Taxes: " << taxes << endl;
return 0;
}

/*
output:

Enter income: 56000
Final Income: 50100
Taxes: 5900


*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote