1. Write a program for displaying following matter on the screen.
DES Fergusson college, Pune 411004. Std. XII Div. I 2. WAP to accept a roll number from the user and display it. 3. WAP to accept two float numbers and display the numbers as well as their division. 4. WAP to accept two integers and display results of all arithmetic operations on them.(Use all the arithmetic operators available in C++). 5. WAP to accept two integers and find and display the maximum using conditional operator. 6. WAP to accept three integers and display maximum as well as minimum using conditional operator. 7. WAP to display area and circumference of a circle. 8. WAP to display area and perimeter of a triangle. 9. WAP to display area and perimeter of a rectangle. 10. WAP to display area and perimeter of a square. 11. WAP to accept Prin amount, rate and period and display the simple interest. 12. WAP to display number of bytes occupied in memory by following data types- Float, double, long int, long double. 13. WAP to incorporate following expression statements and print the values of a, b and c after each expression. 1) a = 20, b=30 2) c = a++ 3) c = --b 4) c = ++b – a-- 14. WAP to accept 3 integers and display the average (average should be float. Use type casting ) 15. WAP to accept a character and display its ASCII value. 16. WAP to accept 2 numbers and print the maximum and minimum number using if else. 17. WAP to accept 3 numbers and print the number which is neither maximum nor minimum. 18. WAP to accept current balance, transaction amount and transaction type W for withdrawal and D for deposit. Depending on the transaction type update the balance and print new balance. 19. WAP to accept the age and check if the person is major or minor. 20. WAP to read a number and check if it is completely divisible by 21 or not. 21. WAP to accept an alphabet and display whether it is vowel or consonant.(Use switch case) 22. WAP to display following menu: 1. ADD 2. Subtract 3. Multiply 4. Divide Accept two numbers and the option number and display the result according to the choice. (Use switch case) 23. WAP to accept 3 numbers and display the maximum number.(use nested if else) 24. WAP to accept 3 numbers and display the minimum number.( use nested if else) 25. WAP to accept the marks and display the class. (Less than 40 fail, 40 to 59 2nd class, 60 to74 1st class and 75 onwards Distinction. 26. WAP to display 1 to 100 numbers using do while loop. 27. WAP to accept the count from the user and display word Hello those many times using while loop. 28. WAP to accept a number and display its table using for loop. 29. WAP to accept a number and check if it is prime or not. 30. WAP to accept an integer and print the sum of its digits. 31. WAP to accept a number and display its reverse number.(last digit first and first digit in the last.) 32. WAP to accept a number and check if it is palindrome or not. 33. WAP to accept a number and check if it is Armstrong number. 34. WAP to accept a string and find the length of it without using library function. 35. WAP to display first 15 numbers of Fibonacci series. 36. WAP to display first 10 numbers of the series 1, 7, 19,43 (no1=1 and no2=no1*2+5) 37. WAP to accept a number and check if it is prime or not. 38. WAP to display following menu: 1. ADD 2. Subtract 3. Multiply 4. Divide Accept two numbers and the option number and display the result according to the choice. (Use switch case) Also continue the above procedure till user wants to continue. 39. WAP to display the following pattern @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 40. WAP to display the following pattern 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 41. WAP to display tables of numbers from 21 to 30. 42. WAP to display factorial of first 6 natural numbers. 43. WAP to accept 5 numbers in an array and display array and the sum of all the numbers. 44. WAP to sort an array of 10 numbers in descending order using bubble sort method. 45. WAP to search an element in an array of 10 numbers using Binary search method. 46. WAP to accept a string and print it in reverse order.(no need to reverse the string, only display in reverse order) 47. WAP to display a to z alphabets and ASCII code of each alphabet. 48. WAP to accept a string and reverse it using a pointer. 49. WAP to print the numbers and address of every number in an array of 5 integers. 50. WAP to search an element in an array of 10 numbers using Binary search method. Write a function to search an element. This function will return the position of the element in the list. 51. WAP to accept base and power and display value of base raised to power. Write function which will accept base and power as arguments and return the answer. 52. WAP to print minimum of 4 integers using function int min(int,int,int,int) 53. WAP to print array of 10 numbers by passing array to a function. 54. WAP to accept required inputs and calculate area of a triangle, a square and a circle. Use function overloading method. 55. WAP to accept a string and reverse it using a pointer. Write a function reverse(char *) to reverses the string. 56. WAP to accept two strings and join them using function join(char *, char *). You can use built in function to join the strings. 57. WAP to accept two strings and join them using function join(char *, char *). Do not use built in function to join the strings. 58. WAP to accept a string and check whether it is palindrome or not. 59. WAP to read a line of text and count the number of words in the text. 60. WAP to read a line of text and count the number of characters in the text. 61. WAP to read a line of text and replace alphabet ‘a’ in the entered text by character ‘#’. 62. WAP to read two numbers and find the GCD of the numbers. Write a function for finding gcd. 63. WAP to accept a string from keyboard and copy the string into another string without using the library function. 64. WAP to accept the length of side of a square. Find the area and perimeter of a square using function void calculate(int, int &, int &) 65. WAP to exchange the contents of two variables using call by reference (using reference variable) 66. WAP to exchange the contents of two variables using pointers. 67. WAP to accept the line of text and count the number of blank spaces in it. 68. WAP to read a word(maximum length 10 character) from user and print each character on a new line in reverse order. 69. WAP to read a string and count the occurrence of a characters ‘S’ and ‘s’ in the string. 70. WAP to find the factorial of a number by writing recursive function.
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab