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

  Find the moment of inertia

Display a brief description of the program and ask the user to specify the type of loading (end load, intermediate load, uniform load)

  Three dimensional array representing parking spaces

start with code in the file lab.cpp. This program works with a three dimensional array representing parking spaces in a parking garage on several floors. The code is incomplete. The functions "main", "display" and "showSpace" are complete. Your job i..

  Implement uniform random number generator

Implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000. Try to use insertion sort to sort them. Compare the running time of two versions of the insertion sort.

  Public transport fare ticketing system

Implement and test a public transport fare ticketing system.

  Implement c code for drawing filled triangles

Calculate the size of a rectangle that is just large enough to contain the triangle. The bx, by, bw, and bh fields of the triangle data structure should be initialized with the appropriate values.

  Throws an exception from a deeply nested

Write a program that throws an exception from a deeply nested function and still has the catch handler following the try block enclosing the initial call in main catch the exception

  Write c++ program- keeps track of an array of person objects

Write a C++ program that keeps track of an array of Person objects and handles basic commands.

  Write c program-visual studio to scan multiple text files

Write program in C or C++ and Visual Studio to scan multiple text files and count number of occurrences of each word in those files. Use binary tree to keep track of all words.

  Write a program that asks the user to enter the names of 3

Write a program that asks the user to enter the names of three salesmen. The program should thenaccept the sales produced for salesman for each quarter of the year. Display the name, and the totalsales amount, of each salesman.

  Write a program to find distance between the two points

CS1325- Write a program to find distance between the two points. The equation of the line crossing these points in the form: y = mx+k. The closest perpendicular point to the line described by the two points given.

  Save all employees entered on the keyboard

After the calculation of each employee payment is done, instead of printing all of the employee payments on screen save him or her information into a file called "Payments.dat".

  Explain the steps for building a rudimentary management

Explain the steps for building a rudimentary management system.

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