C语言 编写一个能产生3行同样输出的程序

For he is a jolly good fellow!

For he is a jolly good fellow!

For he is a jolly good fellow!

程序中除了main函数外 要自己定义2个函数 一个用于把上面夸奖输出一次 另一个用于把最后输出一次

第1个回答  2015-02-21
//

// main.c

// output

//

// Created by lioliu on 15/2/21.

// Copyright (c) 2015年 lioliu. All rights reserved.

//

#include <stdio.h>

void output();

void last();

int main(int argc, const char * argv[]) {

output();

last();

return 0;

}

void output(){

for (int i=0; i<2; i++,printf("For he is a jolly good fellow!\n\n"));

}

void last()

{

printf("For he is a jolly good fellow!\n");

}
希望采纳,欢迎追问。本回答被网友采纳
第2个回答  2015-02-20
你要的真多!!!!
第3个回答  2016-01-26
/*
 ============================================================================
 Name        : c测试.c
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>
int function1(char *string){
puts(string);
puts(string);
puts(string);
return 0;
}

int main(void) {
function1("For he is a jolly good fellow!");

return EXIT_SUCCESS;
}

相似回答