Answer:
Following are the code to this question:
#include <stdio.h> //defining header file
#include <string.h>//defining header file
int main()//defining main method
{
char name[50]; //defining character variable
int A=0,E=0,I=0,O=0,U=0,value=0,i,l; //defining integer variables
printf("Enter string value: ");//print message
gets(name);//input value by gets method
l=strlen(name);//defining l variable to store string length
for(i=0; i<50; i++) //defining loop to count vowels value
printf("A: %d\\",A);//print A value
printf("E: %d\\",E); //print E value
printf("I: %d\\",I);//print I value
printf("O: %d\\",O);//print O value
printf("U: %d\\",U);//print U value
printf("value: %d",value);//print digits value
return 0;
}
Output:
please find the attachment.
Step-by-step explanation:
- In the above code, a char array "name" and integer variables "A, E, I, O, U, i, value and l" declared, in which name array store 50 character value, which uses the gets function to take string value.after input value strlen method is used to store the length of the input string in l variable.
- In the next step, for loop is declared that uses multiple conditional statements to counts vowels and the values of the digits,if it is more then one it increments its value and at the last print method is used to print its count's value.