VL2022230504342 Da
VL2022230504342 Da
VL2022230504342 Da
3. Write a C program which takes a string as input from the user that is not less than
16 characters and not more than 20 characters without any spaces.
(a)Now count number of vowels and consonants in it and display it.
(b)Display the highest repeated vowel.
(c)Remove all the vowels and display the string.
(d)Sort the characters of the string in the lexicographical order.
Output format:
Enter a string that is not less than 16 characters and not more than 20 characters
without any spaces:
Vowels:
Consonants:
Highest repeated vowel:
String without vowels:
Lexicographical order sorted string:
4. A hotel has decided to offer 10% discounts from hotel charge for the wedding
packages during the festive season. Discount is valid only if the number of guests
is more than 200.
You are asked to write a C program to calculate the discount for the wedding
package by considering the number of guests. Two separate functions are to be
declared,
1) To compute the discount amount, if any based on the number of guests and
return to second function. (Discount is % of Total charge to be reduced.)
2) To compute the Amount to be paid after receiving the discount from the discount
function. (Amount to be paid = Total charge - Discount)
In your main function read the number of guests and the charge per guest from
keyboard and display the discount and the amount to be paid for wedding package
using the functions created above, in the following format.
Enter number of guests:
Enter charge per guest:
Discount:
Amount to be paid: