0% found this document useful (0 votes)
3 views7 pages

Cse Code Questions

The document outlines a series of programming lab assignments for CSE 1112, covering a wide range of topics including summation, prime numbers, factorials, Fibonacci series, matrix operations, string manipulations, and number conversions. Each assignment includes sample inputs and outputs to guide students in their coding tasks. The assignments are to be completed and submitted by a specified deadline.

Uploaded by

rafaymimi2225
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Cse Code Questions

The document outlines a series of programming lab assignments for CSE 1112, covering a wide range of topics including summation, prime numbers, factorials, Fibonacci series, matrix operations, string manipulations, and number conversions. Each assignment includes sample inputs and outputs to guide students in their coding tasks. The assignments are to be completed and submitted by a specified deadline.

Uploaded by

rafaymimi2225
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lab assignments for CSE 1112

1. Write a program that shows the summation of positive integer in between lower limit to
upper limit.
Sample Input :1 10
Sample Output : 55
2. Write a program that shows the even summation of positive integer in between lower limit to
upper limit.
Sample Input :1 10
Sample Output : 30
3. Write a program that show the odd summation of positive integer in between lower limit to
upper limit if summation is greater than 9000.
Sample Input :1 10
Sample Output : Summation is not greater than 9000!
4. Write a program that show the summation of 12.2!+22.3!+32.4!+………..+n2.(n+1)! .

5. Write a program that shows prime/non-prime number.


Sample input :6
Sample Output : 6 is not a prime number
6. Write a program to generate the all prime numbers of a given range.
Sample Input :1 20
Sample Output : 2 3 5 7 11 13 17 19
n
7. Write a program for Pr .
Sample Input : n=5 r=2
Sample Output : 20
n
8. Write a program for Cr .
Sample Input : n=5 r=2
Sample Output : 10
9. Write a program that shows the all factorial of positive integer in between lower limit to
upper limit.
Sample Input :1 5
Sample Output :1 2 6 24 120
10. Write a program to generate the Fibonacci Series of a given range. (Fibonacci Series= 0 1
1 2 3 5 8 13 …..)
Sample input :7
Sample Output : 0 1 1 2 3 5 8 13 21

11. Write a program that shows the multiplication of two matrix.

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.


12. Write a program that shows a transpose matrix.

13. Write a program that the show the average marks of best 3 out of 4 CT.
Sample Input : 18 17 18 19
Sample Output : 19
14. Write a program that show the output
Sample Input: n=5
Sample Output: 1 2 3 4 5
12345
12345
12345
12345
15. Write a program that show the output
Sample Input: n=5
Sample Output: 1
12
123
1234
12345
16. Write a program that show the output
Sample Input: n=5
Sample Output: 1
12
123
1234
12345
17. Write a program that show the output
Sample Input: n=5
Sample Output: 1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
18. Write a program that show the output
Sample Input: n=5
Sample Output: 1 2 3 4 5
6 7 8 9
11 12 13
16 17
21

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.


19. Write a program that show the output
Sample Input: n=5
Sample Output: 5
4 5
3 4 5
2 3 4 5
1 2 3 4 5

20. Write a program that show the output


Sample Input: n=5
Sample Output: 5 4 3 2 1
4 3 2 1
3 2 1
2 1
1

21. Write a program that show the output


Sample Input: n=5
Sample Output: 1
123
12345
1234567
123456789

22. Write a program that show the output


Sample Input: n=5
Sample Output: * * * * *
* *
* *
* *
* * * * *

23. Write a program that show the output


Sample Input: 8 5
Sample Output: * * * * * * * *
* *
* *
* *
* * * * * * * *

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.


24. Write a program that show the output
Sample Input: n=4
Sample Output: *
**
****
********
25. Write a program that show the output
Sample Input: n=5
Sample Output: *
***
*****
*******
*********
26. Write a program that show the output
Sample Input: n=5
Sample Output: *********
*******
*****
***
*
27. Write a program that show the output
Sample Input: n=5
Sample Output: *****
*****
*****
*****
*****
28. Write a program that show the output
Sample Input: n=7
Sample Output: *
***
*****
*******
*********
***********
*********
*******
*****
***
*

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.


29. Write a program to read a string and compare it with predefined string “Rajshahi”.

30. Write a program to read a string and print it in reverse order.


Sample Input : Hello
Sample Output : olleH

31. Write a program to compute n raised to the power x.


Sample Input : n=2 x=3
Sample Output : 2^3=8

32. Write a program that show perfect number or not.


Sample Input :6
Sample Output : 6 is a perfect number

33. Write a program that shows all perfect number of any given range.
Sample Input : 1 100
Sample Output : 6 28

34. Write a program that shows armstrong number or not.


Sample Input : 371
Sample Output : 371 is a armstrong number

35. Write a program that shows all armstrong number of any given range.
Sample Input : 1 1000
Sample Output : 1 153 370 371 407

36. Write a program that shows strong number or not.


Sample Input : 145
Sample Output : 145 is a strong number

37. Write a program that shows all strong number of any given range.
Sample Input : 1 1000
Sample Output : 1 2 145

38. Write a program that shows palindrome number or not.


Sample Input : 145
Sample Output : 145 is not a palindrome number

39. Write a program that shows your given string is palindrome or not.
Sample Input : ruet
Sample Output : ruet is not a palindrome string

40. Write a program that convert float number into integer number.
Sample Input : 7.8
Sample Output : 8

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.


41. Write a program that convert uppercase letter to lowercase letter or vice versa.
Sample Input : WeaReEee’17
Sample Output : wEArEeEE’17

42. Write a program that show how many vowels in a word.


Sample Input : RUET
Sample Output :2

43. Write a program that show how many consonants in a word.


Sample Input : RUET
Sample Output :2

44. Write a program that for below:


Sample Input : we live in Bangladesh
Sample Output : we
live
in
bangladesh

45. Write a program that convert decimal number to binary number.


Sample Input :5
Sample Output : 101

46. Write a program that convert binary number to decimal number.


Sample Input : 101
Sample Output :5

47. Write a program that convert decimal number to hexadecimal number.


Sample Input : 5055
Sample Output : 13BF

48. Write a program that convert decimal number to octal number.


Sample Input : 50
Sample Output : 62

49. Write a program that find out the area of any triangle.
Sample Input : 12 10 8 [3 sides]
Sample Output : Surface area= 2880.000 Volume = 11475.000

50. Write a program that find out the volume and surface area of any cylinder.
Sample Input : radius=15 height=17
Sample Output : 39
51. Write a program that can take any character as a input & show ASCII value
of that character.
Sample Input :P
Sample Output : 80

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.


52. Write a program that take 10 data from user and find minimum value.
Sample Input : 10 18 1 29 5 30 4 12 10 98
Sample Output :1

53. Write a program that take 10 data from user and find maximum value.
Sample Input : 10 18 1 29 5 30 4 12 10 98
Sample Output : 98

54. Write a program to sort the data in ascending order


Sample Input : 10 18 1 29 5 30 4 12 11 98
Sample Output : 1 4 5 10 11 12 18 29 30 98

55. Write a program to sort the data in descending order


Sample Input : 10 18 1 29 5 30 4 12 11 98
Sample Output : 98 30 29 18 12 11 10 5 4 1

56. Write a program to add two complex numbers.


Sample Input : (2 + 5i) + (3+2i)
Sample Output : 5 + 7i

57. Find the outputs and explain step by step for the problems 6.58( Book:Schaum’s Outlines).

58. Find the outputs and explain step by step for the problems 7.37( Book:Schaum’s Outlines).

59. Do the same program (number 14 to 28) using function.

60. The Last One


Sample Input : Take your name from keyboard
Sample Output : Print Your Name in the Monitor: D

Caution: Don’t try to copy paste. It’s injurious for brain.

Deadline: Assignment must be submitted on or within 10 Cycle.

Firoz Mahmud, Assistant Professor, Dept. of CSE, RUET.

You might also like