Exercise C++
Exercise C++
Write a program that asks the user to type an integer and writes
"YOU WIN" if the value is between 56 and 78 (both included). In
the other case it writes "YOU LOSE".
Solution
Exercise 2
Write a program that asks the user to type all the integers
between 8 and 23 (both included) using a for loop.
Solution
Exercise 3
Solution
Exercise 4
Write a program that asks the user to type 10 integers and writes
the sum of these integers.
Solution
Author: jimmymass;
Exercise 5
Write a program that asks the user to type 10 integers and writes
the smallest value.
Solution
Exercise 6
Solution
Exercise 7
Write a program that asks the user to type an integer N and
compute u(N) defined with :
u(0)=3
u(n+1)=3*u(n)+4
Solution
Exercise 8
u(0)=1
u(1)=1
u(n+1)=u(n)+u(n-1)
Solution
Exercise 9
Solution
Exercise 10
1. Add 1
2. Multiply by 2
3. Subtract 4
4. Quit
Solution
Exercise 11
Exercise 12
u(0)=3
u(1)=2
u(n)=n*u(n-1)+(n+1)*u(n-2)+n
Solution
Exercise 13
Write a program that asks the user to type 10 integers and write
the number of occurrence of the biggest value.
Solution
Exercise 14
Write a program that asks the user to type the value of N and
computes N! .
Solution
Exercise 15
Write a program that asks the user to type an integer N and that
indicates if N is a prime number or not.
Solution
Exercise 16
Write a program that asks the user to type an integer N and that
writes the number of prime numbers lesser or equal to N.
Solution
Exercise 17
Solution
Exercise 18
Write a program that asks the user to type the value of N and
writes this picture :
N=1
N=2
**
N=3
***
**
and so on...
Solution
Exercise 19
Write a program that asks the user to type the value of N and
display an output like the following:
N=1
*
N=2
**
N=3
***
**
and so on ...
Solution
Exercise 20
u(0) = a (a is an integer)
Solution
Solution
Exercise 21
Request the user to type numbers, each time printing its triple,
until the user enters -999.
Solution
Exercise 22
Solution
Exercise 23
Solution
Exercise 24
Solution
Exercise 25
Exercise 26
Solution
Exercise 27
Solution
Exercise 28
Exercise 29
Write a Program to find out no. of Even & Odd no. in a given
Data Series.
Solution
Exercise 30
Solution
Exercise 31
Solution