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

can you please help me figure out my mistakes? #include <iostream> #include <fst

ID: 674471 • Letter: C

Question

can you please help me figure out my mistakes?

#include <iostream>

#include <fstream>

using namespace std;

int main ()

{

   char ltr ;

   double F , A ,B ,C ,D ;

   cout<<"Enter aletter and 4 number ? "<<endl;

   cin>> ltr >> A >> B >> C >> D ;

   F={(A+B)/(D%C)*(A+2)};

       cout<<"you can reading from k ?"<<endl<<" A= "<< A <<" B= "<<B<<"C="<<C<<"D="<<D<<endl;

   cout<<" F= "<<F<<endl;

   cout<<" thank you "<<endl;

   system ("pause");

   ifstream ("reem.txt")

ofstream outfile("reem.out")

infile >>ltr >> A >> B >> C >> D ;

F={(A+B)/(D%C)*(A+2)};

out<<"the number are A= B= C= D= "<<A<<B<<C<<D<<endl;

outfile.close();

   }

Explanation / Answer

Below are the errors in your code

cout> ltr >> A >> B >> C >> D //   ">/>>" operators are invalid for cout. It should be cin istead of cout.

Correct version : cin>> ltr >> A >> B >> C >> D ;

cout>ltr >> A >> B >> C >> D // Again ">>" is invalid for cout. It should be <<

out<<"the number are A= B= C= D= "<   // out is invalid keyword in c++ It should be cout. And in last '<' this operator is also invalid. Either you need to remove it or use it properly.

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