64 584
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #3356 in C++ for mukunda

Question #3356
Write a program to print a triangle width.
Expert's answer
#include <iostream>
using namespace std;

int main()
{
double triangle[3] = { 10.0, 20.0, 30.0 };
double triangle_width = triangle[0];
for (int i = 1; i < 3; ++i)
& if (triangle_width < triangle[i])
& triangle_width = triangle[i];
cout << "Triangle width is " << triangle_width << endl;
return 0;
}

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions