[ create a new paste ] login | about

Link: http://codepad.org/SgXFkqNS    [ raw code | output | fork ]

kamarakay2000 - C, pasted on Jul 9:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
void repeat(int count);
int main()
{
    puts("At first the raven was like: ");
    repeat(1);
    puts("But then he was all: ");
    repeat(2);
    puts("Wonders never done: ");
    repeat(5);
    return(0);
}
void repeat(int count)
{
    int x;
    for(x = 0; x < count; x++)
        puts("Nevermore! ");
}


Output:
1
2
3
4
5
6
7
8
9
10
11
At first the raven was like: 
Nevermore! 
But then he was all: 
Nevermore! 
Nevermore! 
Wonders never done: 
Nevermore! 
Nevermore! 
Nevermore! 
Nevermore! 
Nevermore! 


Create a new paste based on this one


Comments: