mirror of
https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git
synced 2024-12-21 13:29:06 +00:00
Enter and display a string of characters
This commit is contained in:
parent
5f2779d0aa
commit
27b881a5bb
1 changed files with 22 additions and 0 deletions
22
EX07_afficher_texte.cpp
Normal file
22
EX07_afficher_texte.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Auteur : Franck ALBARET
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
char Texte [80];
|
||||
int i=0;
|
||||
clrscr();
|
||||
puts ("Veuillez taper votre texte :\n\n");
|
||||
gets(Texte);
|
||||
while (Texte [i]!='\o')
|
||||
{
|
||||
if (Texte [i]!=' ')
|
||||
{
|
||||
printf ("%c",Texte [i]);
|
||||
}
|
||||
i=i+1;
|
||||
}
|
||||
getch();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue