[ create a new paste ] login | about

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

kamarakay2000 - C, pasted on Jul 9:
#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 a,b;
    //a = 1;
    //b = 5;
    //for(a,b = 0; a,b < count; a,b++)
    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: