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

can someone help me with this please, the code should be in C++. This is what I

ID: 3832528 • Letter: C

Question


can someone help me with this please, the code should be in C++.

This is what I did so far...

#include <iostream>
#include <fstream>
#include <cmath>
#include <iomanip>
#include <ios>
using namespace std;

void PrintTextFile(string name){
ifstream myInputFile;
string line;
bool lastReadGood = true;
myInputFile.open(name.c_str());

while(true){
getline(myInputFile, line);
lastReadGood = myInputFile.good();
if (lastReadGood == false){
break;
}
cout << line << endl;
}

myInputFile.close();
return;
}


int main(){
string inFile;
ifstream triangle;
bool lastReadGood = true;
triangle.open(name.c_str());

while(true){
getline(triangle, inFile);
lastReadGood = triangle.good();
if(lastReadGood==false){
break;
}
cout << inFile<< endl;
}
triangle.close();

double a, b, c, s;

cin >> inFile;

s = (a + b + c) / 2;

cout << fixed << setprecision(2) << s << endl;

return 0;
}

9.13 Programming 8: Triangles in Files you have any technical This content controlled by your instructor, and Is not tyBookscontent Direct questions or concerns about this content to rour instructor iaaues The zyLab submission system, use the Troubk wth lab button atthe bonom of the lab. Read in name of input file. File will be formatted as below: For each line read in the 3 integer values as the 3 sides of a triangle and calculate the area and print output line with two decimal points

Explanation / Answer

#include #include long fact(int); void main() { clrscr(); int i, n, c; coutn; for(i=0; i
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