5. Write C++ expressions for the following algebraic expressions:
a = 12x
z = 5x + 14y + 6k
y = x(4)
g = h + 12
4k
c = a3
b(2)k(4)
28. Each of the following programs has the same errors. Locate as many as you can.
using namespace std;
int main()
{
double number1, number2, sum;
Cout << “Enter a number:”
Cin << number1;
Cout << ‘”Enter a number: “;
Cin << number2;
Number 1 + number = sum;
Cout “ The sum of the two number is “<< sum
Return 0;
29. #include <iostream >
using namespace std;
int main()
{
int number1, number2
float quotient;
cout << “ Enter two number and I will divide/n”;
cout << “the first by the second for you./n”;
cin >> number1, number 2;
quotient = float <static_cast>(number1) / number2;
cout << quotient
return 0;
Programming Challenges:
1. Miles per Gallon
Write a program that calculates a car’s gas mileage. The program should ask the user to enter the number of gallons of ga
1
Expert's answer
2012-09-28T07:37:25-0400
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment