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

Write one single short C++ program that contains all of the following commands,s

ID: 3670673 • Letter: W

Question

Write one single short C++ program that contains all of the following commands,statements,operators...etc :

1- At least 1 (while or do while) loop.

2- At least 1 logical operators (&& or || or !).

3- At least 1 (char) variable

4 -At least 1 array.

5- At least 1 (string) variable.

B) explain in one or two lines what your program does (use // or */ ).

Please only using these libaries (#include <iostream> - using namespace std;)

Please do not use ( #include <iomanip> - using std::setw; - void main() or others )

please cover everything the 5 codes


Please if don't know don't how get all of this in 1 program Dont answer

My course is HVAC and I don't need to know C++ I just need to pass


Thank You

Explanation / Answer

/* This program accepts Marks of students from a class till you press 'n', then it shows whether the student is Pass or not, also it show Class total marks*/

#include<iostream.h>


void main()
{
   int sum=0,a[100],i=0;

   char ans='y';

   while(ans=='y')
   {
       cout<<"Enter Marks";
       cin>>a[i];
  
       if(a[i]>=35 && a[i]<=100)
           cout<<"Pass";
      
       sum=sum+a[i];      
       i++;
       cout<<"Want to continue [y/n]";
       cin>>ans;
   }

   cout<<"Class total is "<<sum;
}
      

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