Facebook
From CL5, 5 Months ago, written in Plain Text.
This paste is a reply to Re: CSE 2.1 CL2 from CL4 - go back
Embed
Viewing differences between Re: CSE 2.1 CL2 and Re: Re: CSE 2.1 CL2
#include// Online C++ compiler to run C++ program online
#include h>

int main() {

    char line[100];
    
total=0;

/*void sum_array(int arr[], 
int i, j, num, count=0;
    char vowels[11] = "aeiouAEIOU";
    printf("Enter a string: ");
    gets(line);

    for (i = 0; line[i] != '\0'; i++);
    num = i;


    for(i = num-1; i >= 0; i--) 
array_size)
    
{
        printf("%c", line[i]);
    }

    printf("\nThe vowels are:");
    for(i=0; line[i]!='\0'; 
for (int i=0; i           {
            total = total + arr[i];
         }
    }


    {
        *x = *x + *y;
        printf("%d\n",*x);
    }
    */

void sum_matrix(int mat[3][4])
    {
        for (int i=0; i<3; 
i++)
            {
                for(j=0; vowels[j]!='\0'; j++)
                    {
                        if(line[i]==vowels[j])
                            {
                                count++;
                                printf("%c",line[i]);
                            }
                    }
              }
    printf("\nNumber of vowels = %d", count);



    return 0;
}
for (int j=0; j