Write c++ programs

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

1.  Write a C++ program to accept distance in kilometers, coverts it to meters and then displays the result.

2.  Write a C++ program to find area and circumference of a circle.

 [Hint: area = πr2, circumference = 2πr where value of π = 3.14]

3.  Write a C++ program to accept 5 fraction numbers (floating point numbers) and find sum and average of the numbers.

4.  Write a C++ program to accept 3 numbers and find the largest of 3 numbers.

5.  Write a C++ program to accept marks scored in a subject and print the result as below

If the marks scored is less than 50 print result as fail, if the marks is 50 and above and less than 60 print result as II class, if the marks is 60 and above and less than 85 print result as I class and if the marks is 85 and above and less than 100 print the result as distinction. [Use if-else statement]

6.  Write a C++ program to accept numbers from 1 to 7 and display corresponding day of the week. Use switch case statement to do this program.

[Hint: If the given number is 1, then program should print day of the week as 'Sunday', similarly for number 2 Monday, and so on.  For number other than 1-7, program should print invalid day number.]

7.  Write a C++ program to generate multiplication table for a given number.

8.  Write a C++ program to find factorial of a number.

9.  Write a C++ program to find the sum of individual digits of a positive integer.

[Hint: Given positive integer is 4557

Sum of individual digits of a positive integer = 4+5+5+7=21]

10. Write a C++ program to print your name 6 times using for loop.

11. Write a C++ program to generate even number series up to n using while or for loop.

(Hint: Even number series:    2   4   6   8   12   14 ......... n)

12. Write a C++ program to print sum of first n natural numbers up to n using while or for loop.

13. Write a C++ program to accept and print 1_D array.

14.  Write a C++ program to accept and print 2_D array.

15.  Implement a Rectangle class.  Each object of this class represents a Rectangle, storing its length and breadth as float.  Include an accept ( ) function to accept length and perimeter of the rectangle, an area( ) function to calculate and print area of the rectangle and a perimeter( ) function to calculate and print perimeter of the rectangle.

 (Hint: Area of a rectangle = length * breadth, perimeter of a rectangle = 2 * ( length + breadth)

Reference no: EM1346759

Questions Cloud

Create i.c. optometrys balance sheet : The following are account balances on December 31, 2011 for I.C. Optometry given in alphabetical order;
Hypothetical healthcare organization ratios : Discuss and explain why one should apply caution when using financial ratios for analyzing a healthcare management's current financial position and future viability.
Determine the average risk premium : Here are stock market & Treasury bill percentage (%) returns between 2006 and 2010: Determine the average risk premium
Write a perl program : Write perl program which will run on my system and will start another perl program on another linux system. The main program should wait for linux perl program to complete its work and send the result to my main perl program.
Write c++ programs : Write a C++ program to accept distance in kilometers, coverts it to meters and then displays the result. Write a C++ program to find area and circumference of a circle.
What is the project’s npv without the option to expand : The risk free rate is 5%.(a) What is the project’s NPV without the option to expand?(b) What is its ROA (real option analysis value) with the option to expand?
Measurement models goal programming outranking : I would like to use the each following methods to answer the (same question) as attached : VALUE MEASUREMENT MODELS GOAL PROGRAMMING OUTRANKING (ELECTRE I)
Determine the stress state at points a & b : CE 3303 – Solids – MWF – Spring 2014 - Homework Set 23, – The pipe shaft of the auger, rotating at a constant angular velocity, is subject to the axial force and torque shown. Determine the stress state at points A & B and show on a stress element.
Develop this topic into a well-organized essay : Develop this topic into a well-organized essay, following the guidelines below. Correct spelling and grammar will be considered during grading. Part of your grade will depend upon including the required block quotes. Be sure to answer all parts of th..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  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.

  Design a nested program

How many levels of nesting are there in this design?

  Write a program to calculate existing angles

Write a program to calculate existing angles and do if and then from this, and to place fixed angles at certain position.

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Write a bouncing ball video game

The balls bounces within the screen where the two horizontal walls are fixed

  Implementation of sorting technique

Implementation of sorting technique

  C assignment of curl library

C Assignment Curl library must be used To be done on linux, it should be compiled using the following command: gcc -Wall -ansi -pedantic NameOfFile.c -lncurses Please make sure it is commented with clarification Variable names in camel case

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Write two short c programs and solve exam-style problem

Write two short C programs and solve four exam-style problems.

  Create a program that maintains the required book catalog

Create a program that maintains the required book catalog for the circulation desk of a library.

  Skills required by personnel working in information security

What skills are required by personnel working in information security? Write down some job titles in the field and come up with some required qualifications and some desirable qualifications.

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