Saturday, 5 March 2022

Unit - 3 Gujrat University Programs



1. Write a program to find sum of N numbers.


2. Write a program to find factorial of given number. 


3. Write a program to find maximum from given N inputs by user. 


4. Write a program to find reverse of a given number.


5. Write a program to find sum of the digits entered by the user.


6. Write a program to generate Fibonacci series up to N numbers.


7. Write a program to find GCD and LCM of given 2 numbers.


8. Write a program to find the sum of first 100 odd nos. and even nos.


9. Write a program to check whether given number by the user is Palindrome or not.


10. Write a program to check whether the given number is Prime or not.


11. Write a program to print all the prime numbers ranging from 50 to 100. 


12. Write a C program to find x1+x2+x3+x4+ ….+xn.


13. Write a C program to find 1+1/2+1/3+1/4+ …+1/n.


14. Write a program to print following pyramid.  

           *

         *  *

       *  *  *

     *  *  *  *


15. Write a program that accepts an integer N, if the integer N = 4, then print the pyramid : 

         1 

      1 2 1 

   1 2 3 2 1 

1 2 3 4 3 2 1


16. Write a program that accepts an integer N, if the integer N = 4,then print the pyramid :

 4 4 4 4 

  3 3 3

   2 2 

    1


17. Write a program to Print following:

      A 

    B  C

  D  E  F 

 G  H  I  J


18. Write a program to Print following: 

       1

     0  1

   1  0  1

 0  1  0  1


19. Write a program to Print following: 

       1

     0  1

   0  1  0 

 1  0  1  0


20. Write a program to Print following:

             A 

         A B A

     A B C B A

 A B C D C B A


NOTICE : Click Text And Open It.

No comments:

Post a Comment

python programs

1. sum of two number