1. A prime number is an integer greater than one and divisible only by itself and one.
The first seven prime numbers are 2, 3, 5, 7, 11, 13, and 17. Write a program that displays all the
prime numbers between 1 and 100
2. Write another program that accepts a number from the user and returns th Fibonacci value of that
number. You should use recursion in here.
3. Write a program that accepts a number and determine whether the number is prime or not.
4. Write a C++ code that computes the sum of the following series.
Sum = 1! + 2! + 3! + 4! + …n!
The program should accept the number from the user.
5. Write a C++ code to display only even numbers found between 222 and 180.
6. Write and run a program that reads a positive integer n and then prints a diamond of numbers Use for loop.
Given an array A (8,8). Find the sum and the number of positive elements, located below the main diagonal the smallest element of the array (minimum).
please help answer
Make a C++ program using do while loops that will print this output:
*
**
***
****
*****
Input
A line containing five integers separated by a space.
1·2·3·4·5Output
A line containing an integer.
4084101Input
A line containing three decimal numbers with two decimal places separated by a space.
1.53·2.25·1.23Output
A line containing the result with two decimal places.
2.80Hint: Use for loops to input into your functions.
How to can write a C++ program that will print the following shapes.
A.
*
***
*****
*******
*********
B.
*
***
*****
***
*
Given an equation x1 + x2 + · · · + xn = k, where k is a
constant, and x1, x2, . . . ,xn are nonnegative integers (which are considered
as variables in the equation), list all the solutions. Write a C
or C++ program to solve this problem. The input is a pair of integers
(n, k) with k
Define and initialize five arrays of integer types each having 6 elements and an array of pointers p of size 5. Store the starting address of each array to an array of pointers p. Design and call the function and initialize the values of these five arrays randomly using for loop and p inside this function. we can consider p as a 2D matrix. However, in that case, our number of rows (Which were 5 as there were 5 arrays stored in p) and the number of columns (which were 6 as each array had 6 elements) were fixed. In this question, your goal is to sort all data in the 2d array.