Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

(Sum the digits in an integer) Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14.




Hint: Use the % operator to extract digits, and use the operator to remove the extracted digit. For instance, 932 % 10 = 2 and 932 / 10 = 93.




Here is a sample run:

Write a program which takes a 9-digit number input from user, converts it into its reverse

and then display one of the following statements: (10 marks)

• Original number is x steps bigger (where x is the difference between the two)

• Reversed number is x steps bigger

• Both numbers are equal; hence it is a palindrome.


Write a program which takes a number n as input and prints YAYY if the sum of all digits

except the rightmost digit is equal to the rightmost digit., otherwise print OOPS. (10 marks)

For example: If user enters 2237, it will print YAYY because 2+2+3 is equal to 7.

Whereas, if user enters 3425, it will print OOPS because 3+4+2 is not equal to 5. Without using loops


Write a c++ program to display the character a and make it rotate in 360 degrees clockwise ?


2.1 Using multi-dimensional arrays, create an array that will store 10 items of stock (can be any item 

e.g. cars,) with brand name, Number of stock in Store and Quantity Sold


Create a program that will input the amount and quantity of three types of categories, such as Beverages, Fruits, and Canned Goods. Each category has three types of items. You’ll need to input the amount and quantity of the three items in each of the categories then compute the total price and amount due, respectively.

Write a complete C++ program that will prompt name, gender (M or F), age (in years) and marital status (single or married) for each student in FISE and calculate the numbers of married men, single men, married women and single women. Printthese numbers on a student summary report. If any single men are over 30 years of age, print their names and ages on a separate eligible bachelor’s report.


As a form of quality control, the Pancake Kitchen has recorded, on a Pancake file, two measurements for each of its pancakes made in a certain month: the thickness in mm (millimetres) and the diameter in cm (centimetres). Each record on the file contains two measurements for a pancake, thickness followed by diameter. 

Write a complete C++ program 

a) that will prompt the number of the pancake produce per day, the thickness in mm (millimetres) and the diameter in cm (centimetres) of each pancake,

b) to identify and display minimum and maximum for both dimensions,

c) to calculate and display the average for both the dimensions



Using an array , write a C++ program that can hold ten integer input from user. Display those values on the screen , and their prompt the user an integer to search within the array , and count the number of times the item is found.



Enter 10 values in array :


1


2


3


4


5


6


7


8


8


Values in array now : 1 2 3 4 5 6 7 8 8


Enter the value to find : 8


8 was found in 2 times.


____________________________


Process excited with return value 0


Press any key continue . . .

Enter a C++ program that will help accept an input for the array size. Store the user input then display the even odd numbers.



Enter array size :: 10



Enter array elements ::



Enter arr[0] Elements :: 1


Enter arr[1] Elements :: 2


Enter arr[2] Elements :: 3


Enter arr[3] Elements :: 4


Enter arr[4] Elements :: 5


Enter arr[5] Elements :: 6


Enter arr[6] Elements :: 7


Enter arr[7] Elements :: 8


Enter arr[8] Elements :: 9


Enter arr[9] Elements :: 0



Stored Data in Array ::


1 2 3 4 5 6 7 8 9 0



Events Elements in Array are ::


2 4 6 8 0



Odd Elements in Array are ::


1 3 5 7 9

LATEST TUTORIALS
APPROVED BY CLIENTS