If Else if and While Exercises

Assignment Help C/C++ Programming
Reference no: EM132392261

If Else if and While Exercises -

1) Write a program to ask the user to enter three numbers. Find the smallest of three numbers.

2) Write a program to ask the user to enter the marks obtained by the students in 3 subjects.

Then calculate the average marks obtained by the student.

If marks > 85 then display message "Grade A"

If marks > 75 and less than 85 then display message "Grade B"

If marks >65 and less than 75 then display the message "Grade C"

If marks <65 and greater than 50 then display the message "Grade D"

If marks less than 50 then Display the message "Fail"

Note: Use of logical operators is not allowed.

3) Write a program to check if a number is divisible by 3 or 7.

4) Write a C++ program that for a given positive number outputs all the odd numbers separated by a space between 0 and that number.

Hint: Cout>>"Enter the number up to which you wish to print the sum of odd numbers"

5) Write a program to print prime numbers between 1 and 50.

6) Write a program to ask the user to enter interior angles of a triangle.

Check whether the angles entered will form a triangle or not.

7) Write a program to ask the user to enter 4 values which represent either the sides of a geometrical figure. Determine whether it is a quadrilateral, a square or a rectangle.

Note: You are not required to enter the angles. Only ask the user to enter the sides of the geometrical figure.

8) Write a program to ask the user to enter time in 24hr format. Based on the number entered display whether it is morning, afternoon, evening or night.

Attachment:- Assignment File.rar

Verified Expert

The task of the assignment is to develop 8 C++ programs.The C++ program is developed using g++ compiler. All the c++ programs are compiled and tested using g++ compiler.The documentation contains all the 8 programs and output of the program.The c++ program is developed to determine smallest of three number,determine grade of student, check if number is divisible by 3 or 7,generate prime numbers,determine the shape type.

Reference no: EM132392261

Questions Cloud

What is meant by marketing math in pricing : What is meant by marketing math in pricing? Discuss the significance of marketing math in overall marketing success.
High loyalty potential customers : Blue apron: On what advertising vehicles (note the plural) would you recommend Dickerson spend these to maximize spending targeting just new "high loyalty"
Discuss the concept of market positioning : Discuss the concept of market positioning. How do firms position their companies or products in international markets? please explain with an example.
Identify internal problem areas that need attention : Marketing research "allows the business to identify internal problem areas that need attention"..
If Else if and While Exercises : If Else if and While Exercises - Write a program to ask the user to enter three numbers. Find the smallest of three numbers
List the formula used to conduct a break-even analysis : What is a real-world example of how the break-even analysis and formula could be applied.
What is m-pesa : What is M-Pesa and what advantages does this bring to Kenya's population?
Basic marketing concepts and principles still apply : Business-to-business marketing requires a special, unique set of marketing concepts and principles vs. B2B marketing
Fresh out of college and looking for jobs : How can someone find they're other talents and interests when fresh out of college and looking for jobs?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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