ZadatakS24.

#include <iostream>

using namespace std;

int main()
{ int i,j,n,d,brsam,A[100] ;
cout<<„Koliko recenica unosis? n= „;
cin>>n; string s;
for (i=0;i<=n;i++)
{ getline(cin,s);
brsam=0;
for ( j =0; j <= s.size();j++)
if (s [j]==’a’ || s [j]==’e’ || s [j]==’i’ ||
s [j]==’o’ || s [j]==’u’ || s [j]==’A’|| s [j]==’E’ ||
s [j]==’I’ || s [j]==’O’|| s [j]==’U’)
brsam=brsam+1; A[i]=brsam; }
cout <<„Samoglasnika:“<<endl;
for(i=1;i<=n;i++)
cout<<A[i]<<endl;

return 0;

Advertisements