Tuesday, February 23, 2016

PROGRAM

PROGRAM

1.       Wap that print that out the even number 2,4,…..20, using for loop.
2.       Write a program to read in a square, two-d array and display its transpose.
3.       Write a program to accept 10 number I an array. Now print the elements of array. Sort the array and print the ADC & DSc sorted order without using method.
4.        Write a program accept to concatenate two strings without using library function.
5.       Write a program to reverse a string without function.
6.       Write a program count the number of vowel in string.
7.       Write a program to find the length of a string without using library function.
8.       Write a program which replace all vowels in string with character ‘n’.
9.       Write a program takes a number as input and print the sum of all the digits as output.
10.   Write a program takes a number as input & check it is prime number & not. Print the result.
11.   Write a program takes a number as input & print the factorial of the number as output.
12.   Write a program which takes a sentence as input and count the number of space in rhe sentence. Print the result.
13.   Write a program which accept two numbers as input. Find the HCF of two number.
14.   Write a program which takes a sentence as input and then count for the total number of word in the sentence.
15.   Write a program which takes two matrices as input & then add the two matrices. Then print the find resultant matrix.
16.   Write a program in ‘c’ using while loop to find factorial of a positive integer.
17.   Write a program for the no of vowel & consonants in a line of text entered from console.
18.   Write a program to accept any 3 digit integer number 7 display the word equivalent representation of given number.
19.   Write a program to calculate the electricity bill using if-elseif---
    Given the number of units consumed, unit charges are as followers:
·         For frist 50 units         rs 0.50/ units
·         For next 100 units      rs 0.75/ units
·         For next 100 units      rs 1.20 units
·         For next above 250     rs 1.50/units
  20. Star pattern
    *
   ***           
  *****
 *******

*********