Next: Übungsprogramm: Number-Compression
Up: Funktionen, Parameterübergabe, I/O bei
Previous: I/O bei Filterprogrammen
#include <iostream.h>
main(){
char c;
while(cin >> c){
cout << c << c << flush;
}
cout << endl;
}
#include <iostream.h>
main(){
char c;
while(cin.read(&c,1)){
if(c=='\n')
cout << endl;
else
cout << c << c << flush;
}
cout << endl;
}
| © 1997 Gottfried Rudorfer, C++-AG, Lehrveranstaltungen, Abteilung für Angewandte Informatik, Wirtschaftsuniversität Wien, 11/11/1998 |