Помогите изменить программу что-бы она строку считывала с клавиатуры.
#include «stdafx.h»
#include <iostream>
#include <conio.h>
#include <ctype.h>
#include <stdio.h>
int main()
{
char *str=«privet tebe ot medvded»;
int dl=strlen(str);
int g=0;
while (g<dl){
while (str[g]==' '){g++;}
if(str[g]=='a' || str[g]=='i' || str[g]=='u'|| str[g]=='o' || str[g]=='e' ){
while (str[g]!=' '){g++;}
}else{
for(int i=g;i<dl;i++){
g++;
printf("%c", str[i]);
if(str[i]==' '){printf("\n");break;}
}
}
}
printf("\n");
//getch();
system(«pause»);
return 0;
}
Заранее большое спасибо!
|
|||||||||||||||||
|
||||||||||||
|
||||||||||||
|
||||||||||||
|
||||||||||||
|
|
Похожие вопросы |