codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
/* Filename: C2FIRSt.C */ #include<stdio.h> #define Bell '\a' main() { int counter=0; /*Integer variable to count through loop */ char fname[20]; /* Character array holding name */ printf("what is your first name? \n"); /*PROMPT FOR FIRST NAME */ scanf(" %s ", fname); /* Get input as string store in string fname */ while (counter < 5) { printf("%s\n" , fname); counter++; } printf("%c", BELL); return; }
Private
[
?
]
Run code
Submit