1 nbspwrite a c program to accept distance in kilometers

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

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: EM13364321

Questions Cloud

1 each supplier is rated on a 10-point scale 10 highestfor : 1. each supplier is rated on a 10-point scale 10 highestfor four different criteria price quality delivery and
Grindwell inc a manufacturer of grinding tools is : grindwell inc. a manufacturer of grinding tools is conshycerned about the durability of its products which dependson
1 what would be the appropriate statistical procedure to : 1. what would be the appropriate statistical procedure to test the following hypothesis triglyceride values are a good
Write perl program which will run on my system and will : write perl program which will run on my system and will start another perl program on another linux system. the main
1 nbspwrite a c program to accept distance in kilometers : 1. nbspwrite a c program to accept distance in kilometers coverts it to meters and then displays the result.2.
Question a retail development project runs for 2 periods : question. a retail development project runs for 2 periods before the completed property is sold at a fair price. its
Case studya hospital would like to acquire a new medical : case studya hospital would like to acquire a new medical device surgical microscope to improve the success rate of eye
Question 1 ndash the pipe shaft of the auger rotating at a : question 1 ndash the pipe shaft of the auger rotating at a constant angular velocity is subject to the axial force and
Develop this topic into a well-organized essay following : develop this topic into a well-organized essay following the guidelines below. correct spelling and grammar will be

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Creates a bus class

write a program that creates a bus class. create a constructor that initializes the number of passengers and number of seats. declare four objects. use the default copy constructor to initialize two of the objects.

  Assignment in c you will write a program that draws a

assignment in c you will write a program that draws a single level for a rogueshylike computer game. the program will

  Initialize an array and fill the array with the gpa values.

Write a program in java that asks user input (using a loop) for name of 10 student and the corresponding grade point averages (GPAs). Initialize an array and fill the array with the GPA values.

  Write function to find whether number is perfect number

Write down the function perfect which determines whether number is perfect number or not. This function must receive number and return true if number is perfect.

  Create a funcion called max

Create a funcion called max().

  Write program to declare the array of type float

Write down the c++ program which declares the array of 50 components of type float. Initialize array so that first 25 components are equal to square of the index variable.

  Lexicographically preceding permutation

Output a single line containing a space separated list of integers which is the lexicographically preceding permutation of the input permutation.

  Write a function named sort3

Write a function named "sort3" that takes three floating point arguments, call them "x" , "y" , and "z" , and modifies their values, if necessary, in such a way as to make true the following inequalities: x y z .

  The initial data structure with information about a service

Implement a program using function for a defined task. Initial data is read from a file and added from keyboard. Program has to output initial and resulting data.The initial data structure with information about a service:

  Write down a program which will calculate and displays min

write down a program which will calculate and displays the min temperature and the maximum temperature for seven days of a week.

  Grab the tokens from the token vector and find single quot

There is segmentation fault in this code and I don't know where or how to fix it. The purpose of this code right here is to grab the tokens from the token vecctor and find single quotes.

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

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