This shows you the differences between two versions of the page.
|
c:stdio.h:getchar [2013/09/17 02:49] 2001:da8:208:125:88e8:be7a:5118:9d37 [output] |
c:stdio.h:getchar [2024/02/16 01:05] (current) |
||
|---|---|---|---|
| Line 21: | Line 21: | ||
| int main ( void ) { | int main ( void ) { | ||
| - | int chars; | + | int chars; |
| - | printf("type in . to end your input : "); | + | printf("type in . to end your input : "); |
| - | while ((chars = getchar()) != '.' ){ | + | while ((chars = getchar()) != '.' ){ |
| - | putchar(chars); | + | putchar(chars); |
| } | } | ||
| - | return 0; | + | return 0; |
| } | } | ||
| </code> | </code> | ||