Make a mark sheet of a student who is enrolled in five subjects. Marks of each subject should be defined by the user. The Output should contain the percentage obtained in each subject, Total marks obtained, Total Marks and percentage attained by the student.
there are many errors in it please solve it without using void
#include<iostream>
using namespace std;
//STRUCT STUDENT TO STORE THE STUDENT DETAILS
struct student
{
string name;
int regd_no,finalMark;
};
//method declarations
void input(student [],int);
void showAll(student [],int);
void PrintgreaterToX(student [],int,int);
//driver code
int main()
{
int n,i,x;
cout<<endl<<"Enter the number of students : ";
cin>>n; //ask for number of records
student *s = new student[n];//allocate memory to store n student records
input(s,n); //call to input()
cout<<endl<<"DETAIL STUDENT INFORMATION\n****************************\n";
cout<<"REGD_NO\tNAME\tFINAL_SCORE\n**************************\n";
showAll(s,n); //call to showAll()
cout<<endl<<"Enter the value of X : ";
cin>>x; //read the value of x
cout<<endl<<"STUDENTS DETAILS WHOSE FINALSCORE GREATER TO "<<x<<"\n*******************************************\n";
cout<<"REGD_NO\tNAME\tFINAL_SCORE\n**************************\n";
PrintgreaterToX(s,n,x); //call to PrintgreaterToX()
}
//define method input()
void input(student *s,int n)
{
int i;
//loop to read n student records
for(i=0;i<n;i++)
{
cout<<"Enter details for STUDENT - "<<i+1;
cout<<endl<<"NAME : ";
fflush(stdin);
getline(cin,s[i].name); //read the name
cout<<endl<<"REGISTRATION NUMBER : ";
fflush(stdin);
cin>>s[i].regd_no; //read the rigistration number
cout<<endl<<"FINAL MARK : ";
fflush(stdin);
cin>>s[i].finalMark; //read the final mark
}
}
//define showAll()
void showAll(student *s, int n)
{
int i;
//loop to print the details of all student
for(i=0;i<n;i++)
{
cout<<endl<<s[i].regd_no<<"\t"<<s[i].name<<"\t"<<s[i].finalMark;
}
}
//define PrintgreaterToX()
void PrintgreaterToX(student *s, int n,int x)
{
int i,j,t;
string temp;
//sort the records in ascending order according to final score using selection sort
for(i=0;i<n;i++)
{
temp.clear();
for(j=i+1;j<n;j++)
{
if(s[i].finalMark > s[j].finalMark)
{
//swap registration numbers
t=s[i].regd_no;
s[i].regd_no = s[j].regd_no;
s[j].regd_no=t;
//swap marks
t=s[i].finalMark;
s[i].finalMark = s[j].finalMark;
s[j].finalMark=t;
//swap names
temp=s[i].name;
s[i].name = s[j].name;
s[j].name=temp;
}
}
}
//loop to print the student details having mark greater than X
for(i=0;i<n;i++)
{
if(s[i].finalMark > x)
cout<<endl<<s[i].regd_no<<"\t"<<s[i].name<<"\t"<<s[i].finalMark;
}
}
Please kindly help to answer the question BY THE CALCULATION IN OCTAVE CODING with all the detail solution required.
Please kindly do not give the simple and wrong answer as this is my third time to post the same question again because the first and the second one show me just the simple manual calculation without the OCTAVE coding solution.
I hope whoever answer this question, show the solution in OCTAVE CODING SOLUTION in detail.
Please do so or else do not give the wrong answer as it will make me waste my question quota to post the same question again.
I surely will vote you for like button and give the positive comment if you fulfill the requirements.
Thank you so much for your help and understanding.
(PLEASE READ FIRST ALL THE REQUIREMENTS BEFORE ANSWERING THE QUESTION)
(USE OCTAVE CODING SOLUTION ONLY TO SOLVE)
An electronic control system for an automobile engine is to be mounted on top of the fender inside the engine compartment of the automobile as illustrated in Figure 1. The control module electronically computes and controls the engine timing, fuel/air mixture, and so on, and completely controls the engine. To protect it from fatigue and breakage, it is desirable to isolate the module from the vibration induced in the car body by road and engine vibration, hence the module is mounted on an isolator.
Design the isolator (ie., pick cand k) if the mass of the module is 3.5 kg and the dominant vibration of the fender is approximated by yt) = (0.015) (cos 40t) m. Here it is desired to keep the displacement of the module less than 0.0045 m at all times. Once the design values for isolators are chosen calculate the magnitude of the force transmitted to the module through the isolator. (Please show all the OCTAVE CODING calculation in detail to get the solution)
Use OCTAVE to plot the graph and to obtain the optimum value of cand k base on the displacement transmissibility plot. (Please paste all OCTAVE CODING use in the calculation)
DO THE OCTAVE CODING SOLUTION:
Note PLEASE HELP ANSWER IN CODING SOLUTION (NOT MANUAL CALCULATION
According to the prediction of Moore's law, what do you think computers will be like in 2050? Will, we still be using keyboards and mice or will we actually live inside a partially digital world?
what do you think that what will the role of a database system for business in the future?
Write a C++ program that creates a structure array and store the information of 10
employees. Employee is a structure having employeeName and employeeID and Salary as
attributes. Write a function
void DisplayEmployeesRecord (employee a[ ], int s) that displays the array.
Void StoreToFile (employee a[ ], ofstream f, int s) that store each employee information in
a file in the following format
employeeName1 employeeid1 salary1
employeeName2 employeeid2 salary2
employeeName3 employeeid1 salary3
Void storeToArray(employee a[ ], ifstream f, int s) that reads the file and store data to array
prove the following using the laws algebra of propositions
(a) ~[x or (~x and y)] =~x and ~y
A Housing scheme draw the numbers 10,13,14,16,21 for their five lucky customers out of 50 numbers who wins the plots of 400 yards in main downtown of Karachi during the event held in Regent Crown Plaza. Write a program to generate the output of mentioned numbers through while loop using MIPS.
Write a program to calculate roots of equation using quadratic formula using MIPS simulator.
5x2 -4x-12=0
Generate a program to proof that the square root of 30 is 900 using NASM Simulator (DOSBox), Briefly explain the steps of your program execution.