1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Law Incorporation [45]
3 years ago
4

Write a C++ Program that contains one user defined function cal_grades().  In main() function: o Prompt user to enter obtained(

0 - 100) marks for one subject. o Call cal_grades(marks_subject). o Print the corresponding Grade with respect to Marks.  In user defined function: o Perform conditioning with else if statement return char value. o Function must return value.
Computers and Technology
1 answer:
k0ka [10]3 years ago
8 0

Answer:

# include <iostream>

#include<conio.h>

using namespace std;

char grade(int marks);

main()

{

int subject 1, subject 2, subject 3, subject 4, subject 5, sum, percentage;

char G;

cout<<"enter marks of subject 1";

cin>>subject 1;

cout<<"enter marks of subject 2";

cin>>subject 2;

cout<<"enter marks of subject 3";

cin>>subject 3;

cout<<"enter marks of subject 4";

cin>>subject 4;

cout<<"enter marks of subject 5";

cin>>subject 5;

G = grade (subject 1);

cout<<"Grade of Subject 1"<< G;

G = grade (subject 2);

cout<<"Grade of Subject 2"<< G;

G = grade (subject 3);

cout<<"Grade of Subject 3"<< G;

G = grade (subject 4);

cout<<"Grade of Subject 4"<< G;

G = grade (subject 5);

cout<<"Grade of Subject 5"<< G;

sum = Subject 1 +Subject 2 +Subject 3 +Subject 4 + Subject 5;

Percentage =  sum/500*100;

G = grade (percentage);

cout<<"Overall Grade"<< G;

getch();

}

char grade(int marks)

{

int marks;

char 'A', 'B' , 'C' , 'D' , 'F';

if (marks >80)

{

return 'A';

}

else

if (marks >70 && marks< 80 )

{

return 'B';

}

else

if (marks >60 && marks< 70 )

{

return 'C';

}

else

if (marks >50 && marks< 60 )

{

return 'D';

}

else

return 'F';

}

<em>The program will compute the percentage of the marks obtained, then with the help of this percentage score the output will be determined by function named as Grade. </em>

<em />

You might be interested in
What is meant by ‘LASER’?
Zanzabum
Light Amplification by Stimulated Emission of Radiation
5 0
3 years ago
Read 2 more answers
You are a very small company that sells healthcare insurance plans. You estimate that the breach of your customer database will
lozanna [386]

Answer:

C. Accept the risk

Explanation:

The first option is close but might not be suitable for a small company considering it's cost.

The second option which is to spend fifty thousand dollars per year on a data loss prevention solution is projected to cost you more than the risk.

The third option isn't specific and lacks a course of action.

6 0
3 years ago
Technical skills are also called soft skills.<br> Question 9 options:<br> True<br> False
mestny [16]

The statement is false, technical skills are those that serve to perform a specific function and are also called hard skills.

Technical skills are skills that include knowledge in the mechanical, computer, mathematical or scientific area that will allow a good performance of specific tasks.

  • A person with technical or hard skills is able to apply specific methods, procedures and techniques in a specialized field.

  • Soft skills refers to the characteristics and personal competencies that show how a person copes with others, it is related to emotional intelligence.

Therefore, we can conclude that technical or hard skills are the practical knowledge necessary to perform specific tasks, while soft skills are those skills associated with the ability to interact effectively on a personal level.

Learn more about technical skills here: brainly.com/question/10976877

8 0
2 years ago
How many degrees of freedom does any unconstrained object have in 3-D modeling?
Free_Kalibri [48]
I think its 6 degrees

3 0
3 years ago
Which binary number is equivalent to the decimal number 104?
ra1l [238]

B. 01101000

For future reference you can look up decimal to binary calculators online; or binary to decimal.

6 0
3 years ago
Other questions:
  • The following algorithm should output the t times table in the format:
    6·1 answer
  • TCP is the protocol responsible for the delivery of data on the Internet, and IP provides addresses and routing information.
    12·1 answer
  • Write a script that will read the file, (strip the carriage returns), create a dictionary of names and favorite radishes and cre
    9·1 answer
  • What are attribute grammars used for?
    8·1 answer
  • The part of a rocket engine that allows the combustion gases and flames to leave the rocket engine is the
    14·1 answer
  • Drag the correct type of update to its definition.
    13·1 answer
  • Which of the following is a particularly useful feature of Microsoft PowerPoint and
    8·2 answers
  • Difference between switch and switch lite
    10·1 answer
  • What are the real-life applications of coding?
    10·1 answer
  • Are programs that understand physics and/or hardware embedded? for example, one that uses finite-element methods to predict flui
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!