手机恢复出厂设置好吗:求C语言程序

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/09 04:50:57
要求画流程图,呵呵辛苦了。
编写一个函数,功能是求出1到之间能被或整除的所有整数放在数组中,通过返回这些数的个数。仅在函数的花括号中填入编写的语句。
#include <conio.h>
#include <stdio.h>
#include <string.h>

void fun(char *s, char t[])
{

}

main()
{
char s[100], t[100];
clrscr();
printf("\nPlease enter string S:"); scanf("%s", s);
fun(s, t);
printf("\nThe result is: %s\n", t);

2题
函数是将所指字符串中下标为偶数的字符删除。串中剩余字符开成的新串放在所指数组中。要求如上。

#include <conio.h>
#include <stdio.h>
#include <string.h>

void fun(char *s, char t[])
{

}

main()
{
char s[100], t[100];
clrscr();
printf("\nPlease enter string S:"); scanf("%s", s);
fun(s, t);
printf("\nThe result is: %s\n", t);