You are on page 1of 1

#include <iostream>

#include<fstream>
#include<string.h>
using namespace std;
void cuvinte(char s[71]){
char voc[6]="aeiou",*p;
p=strtok(s," ");
while(p){
if(strchr(voc,p[0])==0 && strchr(voc,p[strlen(p)-1])==0)
cout<<p<<" ";
p=strtok(NULL," ");}
}
int main(){
char s[71],a[71],b[71],*p;
int i,k=0;
ifstream f("atestat.in");
ofstream g("atestat.out");
f.get(s,71);
strcpy(a,s);
strcpy(b,s);
a[0]=a[0]-32;
for(i=1;i<strlen(a);i++)
if(a[i-1]==' '&& a[i]!=' ')
a[i]=a[i]-32;
cout<<a<<endl;
cuvinte (s);
p=strtok(b," ");
while(p){
if(strlen(p)==4)
k++;
p=strtok(NULL," ");}
if (k==0)
g<<"nu exista";
else
g<<k;
return 0;

You might also like