C ++ Quiz.
You should use simple control structures (such as sequence, selection, iteration, do or while, e.t.c) and functions.
1A) Write a program that will loop continuously to get user input of positive numbers and total them out. The loop will only stop when the user enters non-positive numbers (including zero). The program will display the average before it ends.
B) Write a program that will randomly generate a number from 1 to 100. The user will then guess the number via several attempts. Each time the guess is wrong, the program will let the user know if it is higher or lower than the number. If the number guessed is correct, it will print “Bingo!” and quit the program.
C) Write a program that asks user to type of series of positive integers. When the user types a negative value, the program should display error message and ask for another value. If the user types 0, it means that the series has end and the program should display the average of all the positive values provided. If the number of typed values is zero, the program writes “No Average”.
D) Write a program to request the user to input a numeric value. If the input is even, the program will display all the even numbers from 2 until the input. If the number is odd, the program will display all the odd numbers from 1 until the input.
E) A laundry shop charges its customer RM5, for every kilo of laundry. Write a program that asks for the laundry weight and if ironing is wanted. For every kilo, RM7 is charged for iron. Display the total price including ironing cost.
F) Write a function named shift that receives an array of 10 integers, one integer at the index location, shifting each array item to the right and eliminate the last item. The function must then display the final array content.
2) Write a program using struct that calculates the sales of items in a store. The program must have a function that works with struct.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more