C++

 Assignment No. 1: Beginning with C++


Practice Programs: 

1. Write a C++ program to find factorial of a given number. 
2. Write a C++ program to check whether a given number is even or odd. 
3. Write a C++ program to check whether a given number is prime or not. 
4. Write a C++ program to check whether a given number is perfect or not. 
5. Write a C++ program to find largest and smallest number of 3 integer numbers. (Use cascading of I/O operators.) 


Set A: 

1. Write a C++ program to generate multiplication table. 
2. Write a C++ program to display first ‘n’ numbers of Fibonacci series. 
 3. Write a C++ program to reverse a number. 
4. Write a C++ program to display Armstrong numbers between two intervals. 
5. Write a C++ program to accept two integers and an arithmetic operator(+, -, *, /) from user and performs the corresponding arithmetic operation and display the result. (Use switch statement) 


Set B: 

1. Write a C++ program to print the following pattern. 

B C 
D E F 
G H I J 
2. Write a C++ program to print the following pattern 
             * 
        * * 
    * * * 
* * * * 
3. Write a C++ program to calculate following series: (1*1)+(2*2)+(3*3)+ … + (n*n) 
4. Write a C++ program to convert decimal number into binary number.


Set C: 

1. Write a C++ program to print the following pattern 
         * 
       * * 
      * * * 
     * * * * 
   * * * * * 
 2. Write a C++ program to calculate following series: 1/1! + 2/2! + 3/3! + …. + n/n!



C++ C++ Reviewed by technical_saurabh on May 02, 2021 Rating: 5

No comments:

Powered by Blogger.