The purpose of this lab assignment is to demonstrate knowledge of selection statements and looping structures
You are going to write a series of small individual programs.
Create a program that will print all odd integers from 1 up to a given value entered by the user.
Write a program that will print out all the Fibonacci numbers up to a certain number of digits. Your program should input the number of Fibonacci numbers to be displayed and display those values. For example if 8 was input it should display 1 1 2 3 5 8 13 21
Write a program that will allow us to sum all the integers from 1 up to a given number. The program will prompt for and allow input for an integer. It will then calculate and display the sum of all integers from 1 to that value.
Create a program that can be used to practice simple multiplication problems. The program should randomly generate 2 single digit numbers for the user to multiply and display it in the form of a problem. The user should enter an answer to the problem and it should check if they got it right or wrong. The program will continue asking until the user gets 3 correct answers.
Write a program that will allow us to enter a specific number of integers into the console and determine the smallest of all those values. The program will first prompt you for how many values you'd like to enter. It will then ask you for that many values and finally print the smallest of all the values entered
Write a program that will create the following diagram.
*
**
***
****
*****
Write a program that will produce the same style of diagram in problem 6, but it will get user input for the number or rows of stars (*) that you would like to see. Thus if I input 7 for the number of rows it will print 7 rows of stars following the same pattern as seen in problem 6
Create a set of nested for loops that will print out all the prime numbers from 2-100. A prime number is any number that is only divisible by 1 and itself.
Write a program that will produce a checkerboard pattern of x's and o's. It should allow you to input the number of rows for the checkerboard and then produce a square matrix of alternating x's and o's in the following manner:
x o x o x
o x o x o
x o x o x
o x o x o
x o x o x
Create a program that will allow me to enter a specific percentage and it will display if that grade was and A, B, C, D, or F. Use proper rounding rules in your definition of the grade (ie 89.5 should be an A). There is no repetition in this example
The program should perform the same process as problem 10 but it should repeat the process until a sentinel value is entered. The sentinel is your choice but it must be made aware to the user when running the program.
The program should calculate the sum of all the digits of a number entered by the user. For example if the user enters 243 it should display the sum of the digits as 9
Write a program that will calculate the average of a set of test scores. The program will continue to ask for test scores until a -1 is entered by the user. Once a -1 is entered it should display the average of all previously entered test scores.
Write a program that will determine if a number is a perfect number. A perfect number is one where all of the factors of the value other than itself sum to the value again. For example 6 is a perfect number because the factors of 6 (not including itself) 1, 2, 3 all sum to 6 (1+2+36). 12 is not a perfect number because 1+2+3+4+6!= 12.