C++ program Statements using Loops Here are some program statements which can be used as practice of Loops furthermore also beneficial to assignment toward students.
1.Write a program that accept input from user furthermore display its factorial.(While Loop)Example: 5! 1 X 2 X 3 X 4 X 5=1202.Write a C++ program which take input from user furthermore Show Maximum furthermore Minimum number among them. Program terminate when user enter 0.Sample output:enter number:5enter number:9enter number:125enter number:6enter number:0Maximum number=125Minimum number=53. Write a program which takes number furthermore length from user furthermore print table regarding that number. e.g user enter num=2 furthermore length=5 you have toward print table regarding 2 up toward 2X5=10.4.Write a program which shows product regarding odd numbers between 1 toward 100.5.Write a program which Sum regarding 1 toward 100 numbers divisible by 4.6.Write a program which take number from user furthermore show all dividers regarding that number.7.Write a program which use For Loop toward check number is Prime or Not.8.Write a program which use while loop toward show prime numbers between 2 toward 100.9.Write a program toward enter 20 numbers furthermore at the end it should display the count of positive, negative furthermore zeros entered. (while Loop)10.Write a program toward calculate the sum regarding following series where n is input by user.1 + 1/2 + 1/3 + 1/4 + 1/5 +…………1/n11.Write a program using any loop which shows complete Ascii table furthermore their values.12.Write a Program which accept range from user furthermore Print Sum regarding Even furthermore Odd number between range.13.Write a program which select a number randomly from 1 toward 10 furthermore ask user toward guess that number furthermore after each result confirm from user that he want toward play more or not.(do While).hint use rand function beneficial to random numbers next Page14.Print the pattern like shown below with loops , where the number regarding stars in first row rectangle is input by userExample if no regarding stars are 11 in first rectangle* - ************** - ************** - ************** - ************** - ************** - *15.Print the pattern like shown below with any loop , where the X(variable) is input by userExample if X is 6*** ************ ****** ************ ****** ************ ***C++ program Statements using Loops
Title : C++ program Statements using Loops
Description : C++ program Statements using Loops Here are some program statements which can be used as practice of Loops furthermore also beneficial t...
Rating : 5