hi guys i was wondering if anyone can write these simple program for me in C++ thanks, i spend all day trying to figure out how to do it but i couldnt im just not good at so if some one can please do it for me it would be helpful thanks
1. Write a program that reads in simple values from the keyboard to cover a range of data types and get the program to output the values to the screen.
2. Write a program that uses operators to perform a certain calculation. For example:
Write a program which allows the user to input the diameter of a pizza (in cm), calculates the area (in square centimetres) of this pizza, and displays that value.
Now get the program to calculate the area of a slice of the pizza. The program must also ask the user to enter in the angle (in degrees) of the required slice, do the calculation, and print this value out to the screen as well.
3. Write a program that uses branching concepts and functions. For example, write a program that will allow the following problem to be solved:
Sometimes its difficult to decide which phone to use my mobile phone or my home phone. If Ive got free minutes left on my mobile phone, then I use them but only if Im calling a land line, or the person I want to call uses the same network provider that I have. If I dont have free minutes left, then I use the home phone (as long as Im at home) unless its on the same network, in which case its still cheaper to use the mobile. Having said that, sometimes my flatmate is on the home phone, and so if its urgent I have to use my mobile anyway. If it is not urgent then I will wait until my flatmate has finished then use the home phone.
4. Write a program that uses arrays. For example:
Ask the user to enter in 10 numbers into an array.
Perform a bubble sort to sort this array into numerical order.
Print the sorted numbers out to the screen.
5. Write a program that uses input and output files.
Write, for example, names and addresses to a file.
Read names and addresses from the file.