Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Lap 5.1 Pre-lab Write a C++ program that asks the user to input an integer number. Then starting from that number the program prints

C++ image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Lap 5.1 Pre-lab Write a C++ program that asks the user to input an integer number. Then starting from that number the program prints out in the console next 100 numbers. eg. User input: 11 Output: 12 13 111 Lap 5.2 Pre-lab Write a C++ program that asks the user to input any number integer or floating point) and the n-th power integer) the number should be raised to. Then calculate the result of the exponentiation of this number to the said power. DON'T USE . eg. User input: 2 N-th power: 5 Output: The number 2 to the power of 5 is equal to 32. Write a C++ program that asks the user to input any integer number n. Then calculate the result of the factorial operation (n! - 1*2*3*...*n). Print in the console result of the n factorial as well as the factorial of numbers before n. eg. User input:4 Output: 2! = 2 Lap 5.4 Pre-lab Write a C++ program that asks the user to input an integer number. Then the program should print out in the console the inputted number of asterisks (*). Furthermore, it should break the line (endl) every 5 asterisks printed, eg. User input: 20 Output: Lap 5.5 Pre-lab Write a program that asks the user to input a PIN code for the first time. Then using the while (or do while) loop ask the user to input the PIN code again. If the PIN code is wrong, the user should input it again (until the number is correct). User PIN input:3333 CHECKPIN: 3341 Output: Input your pin: User PIN input:3412 CHECKPIN: 3412 Output: Correct PIN, Welcom ! Lap 5.6 Pre-lab Modify Lap 5.5 in order to stop the program if the PIN code was entered wrongly 5 times. The user should be informed how many tries are left. User PIN input:3333 CHECKPIN: 3412 Output: Input your pin (4 tries left): User input:3333 CHECKPIN: (wrong number 5 times) Output: You have entered a wrong PIN code for 5 times ! Lap 5.7 LAB Lap 5.8 LAB Write a program that ask the user to enter 5 double numbers through the keyboard using interactive input in a loop. Find and display the average of the data entered. Lap 5.9 LAB Write a C++ program to ask the user input 6 positive and negative members through the keyboard then compute and display the sum of positive and negative numbers separately Lap 5.10 LAB - Using a while loop Write a C++ program to find and display the value of the function y given as following: y=15 + 2r - 3. for the values of x in between 2 and 10, with an increment of 1. Lap 5.11 LAB. Using a for loop Write a C++ program to find and display the value of the function y given as following: y=10 + 3 +15, for the values of x from 5 to 1, with a decrement of 0.5. Lap 5.12 LAB. Using a for loop Write a C++ program to find and display the value of the function y given as following: v=152 + 2x - 3, for the values of x in between 2 and 10, with an increment of 1. Lap 5.13 LAB. Using a while loop Write a C++ program to find and display the value of the function y given as following: y = 10 + 3r+15, for the values of x from 5 to 1, with a decrement of 0.5. Lap 5.14 LAP Write a C++ program to reverse the digits of a positive integer numbers. For example if the number 1234 is entered, the number displayed should be 4321. Lap 5.15 Post-lab Write a C++ program to asks the user enter 10 numbers then print the MAX and the MIN on the secreen. Lap 5.16 Post-lab Write a C++ program to asks the user enter grades for 10 subject then print out how many subject did the user pass and fail. Lap 5.17 Post-lab Write a C++ program to find and print all the integer numbers between 1 to 1000 that can be divisible by 7. Lap 5.18 Post-lab Write a C++ program to find the sum of first 10 numbers. Output: The first 10 numbers are: 1 2 3 4 5 6 7 8 9 10 The summation: 55 Lap 5.19 Post-lab Modify Lap 5.18 in order to let the user enter n numbers then print the first n number with their summation. Output: The user enter 5 numbers: 1 2 3 4 5 The summation: 15 Lap 5.20 Post-lab Write a C++ program to find the sum of the following series: (1.1) + (2 2) + (33) + (4* Output: User input: 6 1*l=1 2*2 = 4 3*3 = 9 4*4 = 16 5*5=25 6*6 = 36 The summation of the series: 91 1 1 Lap 5.21 Post-lab 1 Modify Lap 5.20 in order to find the sum of the following series: 1+ 2+ Output: User input: 4 + ... + ull 22=0.25 0.037037 = 0.00390625 The summation of the series: 1.29094 Lap 5.22 Post-lab Write a C++ program to calculate the following series (1) + (1+2)+(1+2+3)+(1+2+3+ 4) + ... + (1 + 2+ 3+ 4+ ... + n). Output: User input: 51 = 11+2 = 31+2+3=61+ 2+ 3+ 4 = 10 1+2+3+4+5 = 15 The summation of the series: 35 Lap 5.23 Post-lab Write a C++ program to asked user to enter positive integers to counter, maximum, minimum, and average or terminate the process with -99. Output: User input: -99 The program terminated. This is the result: Number of positive integers is: 5 The maximum value is: 12 The minimum value is: 6 The average value is: 8.00 Lap 5.24 Post-lab Write a C++ program to display the first n terms of Fibonacci series, which is a series where the next term is the sum of pervious two terms. The first two terms of the Fibonacci sequence is 0 followed by 1. Output: User input the number of terms to display: 11 result of the Fibonacci series: 011 23 5 8 13 21 34 55 Lap 5.25 Post-lab Write a C++ program to find the sum of the series 1 + 11 + 111 + 1111 +.. +n terms. Output: User input: 5 1 + 11 + 111 + 1111 + 11111 The summation of the series: 12345

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions