Anda di halaman 1dari 5

Lab assignments for ME 2322

1. Write a program that shows the summation of positive integer in between lower limit to upper limit. 2. Write a program that shows the even summation of positive integer in between lower limit to upper limit. 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. 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 Output : 6 is not a prime number

6. Write a program to generate the all prime numbers of a given range. 7. Write a program for 8. Write a program for
n n

Pr . Cr .

9. Write a program that shows the all factorial of positive integer in between lower limit to upper limit. 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 Output : 0 1 1 2 3 5 8 13 21

11. Write a program that shows the multiplication of two matrix. 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.

Firoz Mahmud, Lecturer, Dept. of CSE, RUET.

14. Write a program that show the output 12345 12345 12345 12345 15. Write a program that show the output 12 123 1234 12345 16. Write a program that show the output 12 123 1234 12345 17. Write a program that show the output 6789 11 12 13 16 17 21

12345

12345

Firoz Mahmud, Lecturer, Dept. of CSE, RUET.

18. Write a program that show the output 23 456 7 8 9 10

11 12 13 14 15 19. Write a program that show the output 123 12345 1234567 123456789 20. Write a program that show perfect number or not. Sample input: 6 Output : 6 is a perfect number 1

21. Write a program that shows armstrong number or not. Sample input: 371 Output : 371 is a armstrong number

22. Write a program for the following input & output combinations. Sample input: 10 Output :149

23. Write a program that convert float number into integer number. Sample input : 7.8 Output :8

Firoz Mahmud, Lecturer, Dept. of CSE, RUET.

24. Write a program that convert uppercase letter to lowercase letter or vice versa. Sample input : WeaReMe09 Output : wEArEmE09

25. Write a program that show how many vowels in a word. Sample input : RUET Output :2

26. Write a program that show how many consonants in a word. Sample input : RUET Output :2

28. Write a program that for below: Sample input : we live in Bangladesh Output : we live in bangladesh 29. Write a program that shows strong number or not. Sample input: 145 Output : 145 is a strong number

30. Write a program that shows palindrome number or not. Sample input: 145 Output : 145 is not a palindrome number

Firoz Mahmud, Lecturer, Dept. of CSE, RUET.

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

32. Write a program that convert decimal number to binary number. 33. Write a program that convert binary number to decimal number. 34. Write a program that convert decimal number to hexadecimal number. 35. Write a program that convert decimal number to octal number. 36. Write a program that find out the area of any triangle. 37. Write a program that find out the volume and surface area of any cylinder. 38. Write a program that can take any character as a input & show ASCII value of that character. 39. Write a program that shows all perfect number of a given range. 40. Write output & explain step by step for below code.
for(dog = 1;dog < 6;dog++) { for(cat = 1;cat < 6;cat++) { for(pig = 1;pig < 4;pig++) { printf("Dog = %d Cat = %d Pig = %d\n",dog,cat,pig); if ((dog + cat + pig) > 8 ) goto enough; }; }; }; enough: printf("Those are enough animals for now.\n");

Firoz Mahmud, Lecturer, Dept. of CSE, RUET.