Programming in c++

Assignment Help Basic Computer Science
Reference no: EM13831367

Programming in C++

Loops and DecisionsPart A

Explain the difference between:

s = 0;

If (x > 0) s++;

If (y > 0) s++;

and

s = 0;

if (x > 0) s++;

else if (y > 0) s++;

Part B

What are the values of s and n after the following loops?:

a. int s = 1;

    int n = 1;

    while (x < 10) 

    s = s + n;

    n++;

b. int s = 1;

    int n;

    for (n = 1; n < 5; n++)

        s = s + n;

c. int s = 1;

    int n = 1;

    do

    {

        s = s + n;

        n++;

    }

    while (s < 10 * n);

Part C

Write a program that accepts four grades, calculates the average of the four grades, and then converts the average from a number grade into a letter grading using the following grading scale: 

A  100 - 90

B   89 - 80

C   79 - 70

D   69 - 60

F   59 - 0

Output the final grade average along with the letter grade.

Reference no: EM13831367

Questions Cloud

How steel and computer industry have used adaptation theory : Prepare a report using the Theory relating to Adaptation, Aggregation and Arbitrage to explain how companies from the following industries have used this theory for the pursuit of their businesses.
Windows word is an example : Windows Word is an example of System software. Platform software.
How would the line be balanced : The cycle time is determined to be 1.5 minutes. how would the line be balanced by choosing the assignable task hang the longest task time first?
Whose trademark is the operating system unix : Whose trademark is the operating system UNIX? A.Motorola B.Microsoft C.BELL Laboratories D.AshtonTate
Programming in c++ : Programming in C++ Loops and DecisionsPart A Explain the difference between: s = 0; If (x > 0) s++; If (y > 0) s++;
Identify a subset of customers : Having had success using customer data to build predictive models to guide direct mail campaigns for special plumbing offers, he considers that data mining could help him to identify a subset of customers who should be good prospects for his new s..
Design a flowchart or pseudocode for a program : Chocolate Delights Candy Company manufactures several types of candy.  Design a flowchart or pseudocode for a program that accepts a candy name (for example, "chocolate-covered blueberries"), price per pound, and number of pounds sold in the average ..
How is project management important in operations management : How is Project Management important in Operations Management? How is using PM tools beneficial in a professional life? In project planning, why is it important for a team to have clear understanding of goals and scope?
Services marketing-pricing concepts : This discussion helps you develop the skills to master the following course competencies:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Steps internet explorer go through when we click on web page

Explain in detail all the steps Internet Explorer should go through when you click on a web page and traverse the network created in the previous exercise.

  Construct a vector containing all of the even numbers

Construct a vector containing all of the even numbers between 6 and 33, inclusive of the end points. Store your answer in the variable evens. (Note: 33 is not an even number)

  Discuss where a computer stores its basic hardware

Discuss where a computer stores its basic hardware settings, why it does so, and what some of those settings are. Compare storage devices using four criteria: versatility, durability, speed, and capacity.

  Activity diagram of each step of ordering pizza

Draw an activity diagram representing each step of the process; from the moment you pick up the phone to the point where you are eating the pizza.

  A good file management system

A good file management system is necessary to organize your files. A file management system is made up of files and file folders. You can copy, delete, rename and move these files and folders around as like.

  Design and create a website with html

Your task is to create a website on anything that is of interest to you. The website will need to have minimum of 3 web pages. This means that you have an index page that will link to other pages and vice versa.

  Prepare a proposal to deploy windows server onto an existing

Prepare a proposal to deploy Windows Server onto an existing network, based on a provided scenario. The proposal will include deployment, security policy, application and data provisioning, monitoring, and continuity plans. For a more detailed projec..

  Discuss the concept of phase shift in oscillators

Discuss the concept of phase shift in oscillators and how it is controlled in oscillator circuits.

  Swing gui to translate test this is input in english

Design and code a SWING GUI to translate test this is input in English into Pig Latin.You can assume that the sentence contains no punctuation. The rules for Pig Latin are

  Sequence of events necessary to establish communication

Multiple KDC Domains to chain of three KDC. In other words, suppose that Alice wants to talk to Boris through a chain of 3 KDCs. Provide sequence of events necessary to establish communication.

  Write a xml schema for the validation of the document notes

write a XML schema for the validation of the document notes.xml

  Corporate embezzlement

Imagine you are employed by a large city police department as the leader of the digital forensics division. A large corporation in the city has contacted the police for assistance in investigating its concerns that the company Chief Financial Offi..

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