Computer science-intro to c problem

Assignment Help Business Management
Reference no: EM131916427

Computer Science - Intro to C++ Problem

You be prompting a student for grades and credits for courses taken. From that, you will calculate a GPA.

This site: https://www.back2college.com/gpa.htm shows you how to calculate a GPA.

Keep prompting the student if they want to add more courses.

IMPORTANT NOTES!

  • The course name is prompted for, but nothing is done with it.
  • We are just using the grades A, B, C, D, and F so you won't have to do so much typing!
  • You will need to use the "set precision" command Set it to "fixed" and "2".
  • You will need to use the "cin.ignore()" function as discussed earlier in the course.

This is what I have thus far:

#include <iostream>

#include <string>

using namespace std;

string course;

int credits;

string grade;

string answer;  

int main() {

  cout << "Enter a course name: ";

  getline(cin,course);

  cout << course;

  cout << endl;

   cout << "Enter number of credits: ";

  cin >> credits;

  cout << credits;

  cout << endl;

  cout << "Enter you grade (A, B, C, D, F): ";

  cin >> grade;

  cout << grade;

  cout << endl;

  cout << "Continue ('Yes' or 'No')? ";

  cin >> answer;

  cout << answer;

  cout << endl;

  return 0;

}

Do I need a while loop to ask questions, and I am assuming a:

if(grade == "A"){

gradePoint = credit * 4;

}

What about the "set precision" to a fixed 2 value and "cin.ignore()" in the program?

Reference no: EM131916427

Questions Cloud

Summarize the key questions methods results and conclusion : Prepare a power point presentation of article. Provide background context for the paper and summarizing the key question(s), methods, results, and conclusions.
Amount of food eaten by a certain kind of animal : The purpose of this program is to determine the amount of food eaten by a certain kind of animal. Rather than using one big pile of main
What are the total indirect costs : What was the flotation cost as a percentage of funds raised? What are the total indirect costs? What are the total direct costs?
Create a risk and risk migration chart : Investigate Operations and Logistics practices in the chosen company, including Purchasing and Asset Management. Also, research business purchasing.
Computer science-intro to c problem : You be prompting a student for grades and credits for courses taken. From that, you will calculate a GPA.
Credit cards with debt and different interest rates : An individual has three credit cards with debt and different interest rates.
Variables named myscore and expectedscore : A program stores test scores in two int variables named myScore and expectedScore. Write the C++ code to compare the two scores and then display
What are the principal components of social media : What are the principal components of social media(such as Twitter, Instagram) and key networking(Internet) technologies?
What will value of firm be if company takes on debt equal : What will the value of the firm be if the company takes on debt equal to 40 percent of its unlevered value. What is the current value of the company?

Reviews

Write a Review

Business Management Questions & Answers

  Business analytics for my research project paper

1) Background - Three to four sentences 2) Objectives - List objective(s) of the project in "bullets" format

  Express how compliance plans correlate to different medical

Express how compliance plans correlate to different medical records documentation standards. Which steps in the medical billing process studied of Medical Insurance are related to the subsequent:

  Do citizen journalists do this type of research

Do citizen journalists do this type of research? Do citizen journalists seek answer or do they seek to prove points of view? Give examples.

  Major theoretical approaches to knowledge managementcompare

major theoretical approaches to knowledge managementcompare and contrast the major theoretical approaches to knowledge

  Market penetration strategy- manufacturer of sporting goods

Berkshire Hathaway Inc., a big property insurance company owns a large chain of jewellery stores as well as has recently purchased Russell Corporation a manufacturer of sporting goods

  Organization structure and objective of the corporation

What actions would you take or recommend as financial managers to overcome obstacles & maximize shareholders' wealth? Explain.

  A customer focused and centered perspective

Why do some firms neglect to operate from a customer-focused and centered perspective, given that customers represent the "bloodline" for any organization?

  Identifies the impact of potential change factors

Identifies the impact of potential change factors including the role of technology. Using your current work organization (or an organization of interest) as the subject matter, research the elements of business and prepare an APA formatted paper.

  Pseudocode algorithm for a computer store

Write a pseudocode algorithm for a computer store that inputs the type of customer and the amount of the purchase.

  Supply chain logistics management

From Supply Chain Logistics Management, Bowersox, Closs, Cooper, & Bowersox, p. 185:

  Trends current problems air trans

What do you think is the most important challenge to the industry? Is it a new challenge or one that has plagued the industry for decades? Support your response.

  Fundamental building blocks of source programs

Why are characters the fundamental building blocks of source programs? Provide an example to illustrate this concept.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd