Answer to Question #159242 in C++ for Ali

Question #159242
  • Write a C++ program which will create 5 variables to solve following expression and display the answer.
  • · Result=a2 +b3 √c+d
1
Expert's answer
2021-01-28T09:52:40-0500
#include <iostream>
#include <cmath>
using namespace std;
int main () {
    int a, b, c, d;
    cout << "a = "; cin >> a;
    cout << "b = "; cin >> b;
    cout << "c = "; cin >> c;
    cout << "d = "; cin >> d;
    float result;
    result = a + b * sqrt(c + d);
    cout << result;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog