Sunteți pe pagina 1din 5

Console Applications

1. Write a program to accept a character from the user. If the letter input is any Vowel then display a message You have input,Vowel else display This is not a Vowel. 2. Write a program to check if a given no. is prime. 3. write a program to print the week day by passing the day number through switch case. 4. Write a program to display a greet message according to the marks obtained by the student 5. A palindrome is a number or a text phrase that reads the same backwards as forwards. For example, each of the following five-digit integers are palindromes: 12321, 55555, 45554 and 11611. Write an application that reads in a five-digit integer and determines whether it is a palindrome. If the number is not five digits, display an error message dialog indicating the problem to the user. When the user dismisses the error dialog, allow the user to enter a new value. 6. Prompt the user to provide two numeric values. Using conditional operator to find the smaller & print. 7. Write a Menu driven program. Store applications. Write a program to store bill number, name, quantity and price of item .Take values from the user and display the total bill amount. 8. Write a menu driven program in following shape.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * *

* * * * * * *

* * * * * * * * *

A AB ABC ABCD ABCDE

9. Write an application that reads a nonnegative integer and computes and prints its factorial. 10.Write a program to display first 5 Armstrong nos. 11.Write a program to find factorial of a given no. 12.Write a program to print the Fibonacci series. 13.Write an application that calculates the squares and cubes of the numbers from 0 to 10 and prints the resulting values in table format, as follows Number Square Cube 0 0 0 1 1 1 2 4 8 3 9 27 4 16 64 5 25 125 6 36 216 7 49 343 8 64 512 9 81 729 10 100 1000

14.Enter basic salary from the user. Write a program to calculate DA and HRA on the following conditions:Salary <=2000 DA 10% HRA 20%

>2000 && <=5000 >5000 && <=10000 >10000

20% 30% 50%

30% 40% 50%

15.Write an application that estimates the value of the mathematical constant e by using the formula 1 1 1 1 E= --- + --- + --- + --- 1! 2! 3! 4!

After the array and Method


16.. WAP that create a structure as person with three fields First name, Last name , age and a parametric constructor to accept the values from users. Display the output. 17.Write a program that will print numbers from 100 to 150. However, if a prime no. or handsome no. is encountered the program must terminate. 18.Write a program using procedures to calculate the result of following expression. S=(x! +y!)/z! where ! indicates the factorial. 19.Write a program that creates an array and stores first five odd and prime no. in it.

20.Enter the 10 -10 no in two array and add subtract multipaction and divions according to user. 21.Enter the 10 no in array and perform following task 1. Searching in user choices no 2. Sorting ascending and descending order 22.Write a program to find the Sum of values of Rows and Columns in Double Dimensional Array. 23.Wap to multipaction additions in two matrix and print in matrix from. 24.Write the program to print the handsome no. handsome no is like 123(1+2=3).sum of first 2 digits equal than 3rd digits. 25.Write a program to find out the product of the digits of the given number. 26.write a program to print the pascal triangle using2-D array a) all the elements of column 0 is 1. b) all the elements for which rows and coloumn is 1. c) any other element can be obtain by adding to elements of previous row. Pascal Triangle---1 11 121 1 3 31 14641 1 5 10 5 10 1 27.write a program to input a no in digits and print it in figures. 28.Write a program to find the sum of digits Of a number until the sum is reduce to one digit. Ex.528769 -> 38 -> 11->2 29.Write a program to convert a binary number to decimal number. 30.Write a program to convert a decimal number to binary number. 31.write a program to input a in digits and print it in figures.if enter tha less than 4 digits like 1200 than print (one thousand two hundred ).if user enter the grater than 4 like 12345 than print( one two three four five) and so on.

32. write a program to find out the sum of the series upto n terms 1/! 1 + (1+2)/! 2 + (1+2+3)/! 3 +. .. .. .. .. 33.Write a program to print twin prime between 1 and 500 Ex.-3 and 5, 11 and 13, 17 an 19, and so on 34.write a program to find out the frequency of each digit in a given number. 35.write a program to take two 1-D array .sort these arrays merge them and print the merged array in the sorted order. 36.write a program to print the number is even or odd Using goto. 37.write a program that accepts a line by user and replace the given character with the provided one. 38.Show the method overloading in 3 ways. 39.write the program to find out the prime factor of the number using both iterative and recursive methods. 40.Show the use of out keyword. 41. Show the use of ref keyword. 42.Wap to pass the different 2 type of parameter in param array and print it. 43.Create a enum in three value state, national, international create the function truck that has the reg no., capacity and permit. Permit takes the value by enum.

S-ar putea să vă placă și