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

The Omni Meeting Hall has a maximum room capacity of 205 people to adhere to fir

ID: 3571278 • Letter: T

Question

The Omni Meeting Hall has a maximum room capacity of 205 people to adhere to fire law regulations. Write a C++ program that determines if an event request violates fire law regulations for that room. The program should read in the first and last name of the person making the room request and the number of people planned to attend the event. If the number of people to attend is less than or equal to the maximum room capacity, the program should print the person's name, a message that says 'The Omni Hall can accommodate the event", and print the number of additional people (if any) that may legally attend the event. If the number of people to attend the event exceeds the maximum room capacity, the program should print the person's name, a message that says "Your event exceeds fire regulation laws for the Omni Hall ", and prints how many people must be excluded from the event in order to have it at Omni Hall. Write a program that determines the letter grade each student in a class receives. The program should read the list of student names, first exam scores, midterm exam scores,  and final exam scores from a file. The final grade is determined by taking 20% of the first exam. 30% of the midterm exam, and 50% of the final exam. The program should print to the screen the student's name and the letter grade they should receive for the course. Use a value-returning function to determine the letter grade. Letter Grades should be determined according to the following.

Explanation / Answer

3.

#include<iostream.h>

void main()

{

int max=205,int arr[205];

char fname[50],lname[50];

cout<<"R u Request for room";

cout<<"..................................";

cout<<"Enter first name:";

cin>>fname;

cout<<"Enter the last name:";

cin>>lname;

if(strlen(arr)==205)

{

cout<<"your event exceeds ownin Law";

}

else

{

cout<<"accomidate the room for even";

for(i=0;i<=205;i++)

{

cin>>arr[i];

}

}

}

4.Ans

#include <fstream>
#include <iostream>
using namespace std;

ifstream infile;
ofstream outfile;
void grades(int&,int&,int&); // Grades from the input file
int myavg(int,int,int); // Calculates the Average of the 3 grades
void letters(int&); // Letter Grade: (P)ass or (F)ail
void heading(int&); // Heading of Table


int main()
{
  
int x,y,z,average,studentid,lettergrade;
//outfile.open("data.txt");
//heading(x);
outfile.open("data.txt");
outfile << " Student Information" << endl << endl;
outfile << "Student ID Grade Average Letter Grade" << endl<< endl;
cout << "Please enter the Student's ID" << endl;
cin >> studentid;
  
  

while (studentid > 0) {
  
  
  
grades(x,y,z);

outfile << " " << x << " " << y << " " << z << endl;
outfile << studentid << " " << myavg(x,y,z) << endl;


  
cout << "Please enter another Student's ID" << endl;
cin >> studentid;

}

system("PAUSE");
return 0;
}
void grades(int &a,int &b,int &c)// Grades from the input file
{
  

infile.open("grades.txt");

while(!infile.eof()){
  
infile >> a >> b >> c;
}
return;

  
}   

int myavg(int a, int b, int c)// Average of the 3 grades
{
int average;
int first,mid,last;
first=a*20/100;
mid=b*30/100;
last=c*50/100;

  
average = (first+ mid+ last)/ 3;
  
return average;
}
void letters(int& a)// Letter Grade: (P)ass or (F)ail
{
int average;
outfile.open("Table");


if (average >= 70)
cout << "P" << endl;
else
cout << "F" << endl;

}
Edit & Run

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