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

write a C++ program that gets a number from user. according to given number program should calculate and display the multiplication table of given number as shown as below in the function"void multiplicationTable";





A teacher wants to maintain the attendance for the classroom. After storing the attendance, he wishes to print the details of the top 3 attendance percentage holders. Create a class with the private data members: name (string), roll_no (integer), percent (float). Create a constructor which will initialize name with NULL, roll_no with 0 and percent with 0.0. Public data members: A function get_details() – which will accept all the details from the user, a function show_details() – which will display all the details. Define another function called get_attendance() which will return the attendance of the calling object. Using the get_attendance() function, get the attendance and sort the records in descending order.




Show the details of the top 3 attendance percentage holders by invoking the




show_details() function. Define a destructor which prints “Objects destroyed successfully”.

Instructions:

  1. Input two integer values. The first one shall accept any integer from 0-9 and the other one shall take a non-zero positive integer.
  2. Using a while loop, count how many of the first integer (0-9) is present in the digits of the second inputted integer and print the result (see sample input and output for example).
  3. Tip #1: You have to use your knowledge from the previous problems in looping through the digits of a number: % 10 to get the rightmost digit, while / 10 to remove the rightmost digit. Make sure to solve the previous problems first.


Input


1. First integer

2. Second integer

Output

The first line will contain a message prompt to input the first integer.

The second line will contain a message prompt to input the second integer.

The last line contains the number of times the first integer occurred in the digits of the second integer.

Enter·the·first·integer·(0·-·9):·2
Enter·the·second·integer:·124218
Occurrences·=·2

Instructions:

  1. Input a non-zero positive integer.
  2. Using the same concept as the previous problem, figure out how to separate the digits of a number and determine which of the digits is the largest one, using a while. Afterwards, print the largest digit.
  3. Tip #1: Create another variable that will hold the largest digit. Initial its value to a negative integer, like -1, outside the loop.
  4. Tip #2: Everytime you get the rightmost digit, check if it is greater than the current largest digit. If it is, set it as the new largest digit.


Input


1. An integer

Output

The first line will contain a message prompt to input the integer.

The second line contains the largest digit of the integer.

Enter·n:·214
Largest·digit·=·4

Instructions:

  1. Input a non-zero positive integer.
  2. Using while loop, print out each digit of the inputted integer in separate lines, starting from its rightmost digit until the leftmost digit of the number.
  3. Tip #1: Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2.
  4. Tip #2: On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41.
  5. Tip #3: You'd have to repeat Tip #1 and Tip #2 inside the while() loop for this problem while the inputted integer is not yet 0.


Input


1. An integer

Output

The first line will contain a message prompt to input the integer.

The succeeding lines contain the digits of the integer.

Enter·n:·214
4
1
2

After the success of Doctor Strange in the Multiverse of Madness UCP movie club decided to display this movie on a bigger screen in UCP auditorium. But you have to buy a ticket for the show. Following are the rates of tickets:

Type of Ticket (1, 2, 3) Price Tax

Student= 100 and 17%tax

Faculty= 200 and 17%tax

Staff= 150 and 17%tax

Write a C++ program in which, ask user about how many tickets they want to buy? And which type of ticket they want to buy. Calculate total bill and display it on console.



  1. Input a positive integer. This will serve as the starting point of the loop.
  2. Using a while() loop, print out all the odd numbers starting from the inputted integer, until 0. The outputted numbers must all be separated by line.
  3. Also remember that since the loop goes to descending order, a decrement variable shall be created and decreased per iteration for the loop to terminate when it reaches 0.

Input


1. An integer

Output

The first line will contain a message prompt to input the integer.

The succeeding lines contain the odd numbers.

Enter·n:·10
9
7
5
3
1

Government of Pakistan apply a tax on education sector in which, if your annual fee is greater than 2,00,000 than you have to pay 10% of exceeding amount as tax. If your annual fee is lesser or equal to 2,00,000 than your tax is zero. Write a C++ program in which, read fee of two semesters and identify either user have to pay tax or not. If user have to pay tax than calculate total fee with tax.


Create a Python script that will display the next 5 numbers in the sequence where each number is the sum of the previous two.


This is my text file:

8 3

4 5

6 2


The sample output should be like this when I run the code:

8 3 11 14 25 39 64

4 5 9 14 23 37 50

6 2 8 10 18 28 46


I need the code to have the python script that will display the next 5 numbers from my text file stated above.


Python Program


Write a python program to print the following output.


Input

The first line contains a string S representing a unique id.

The second line contains an integer N representing group length.


Output

The output should be a single string representing the new unique id.



Sample Input1

2-4A0r7-4k

3

Sample Output1

24-A0R-74K



LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS