C
Programming and Technical
Programming
Program
Program to input 'n' number of strings and print the string which is having highest number of vowels?
Read Solution (Total 2)
-
- #include
#include
void main()
{
char str[50];
int vowels = 0, i = 0;
clrscr();
printf(“nnt ENTER A STRING…: “);
gets(str);
while(str[i] != ‘ ′)
{
if(str[i]==’A’ || str[i]==’a’ || str[i]==’E’ || str[i]==’e’ || str[i]==’I’ || str[i]==’i’ ||
str[i]==’O’ || str[i]==’o’ || str[i]==’U’ || str[i]==’u’)
vowels++;
i++;
}
printf(“nnt THE TOTAL NUMBER OF VOWELS IS…: %d”, vowels);
getch();
} - 10 years agoHelpfull: Yes(0) No(8)
- //Program to find maximum vowels among n strings
#include
void main()
{
char str[5][20],temp[20];
int n,i,j,counter,maxi=0;
printf("Enter number of strings( - 10 years agoHelpfull: Yes(0) No(0)
C Other Question