一道C语言题目

||| 你好意思啊 字母或结尾输出) */} ||| int func(char *s *q); putchar('/n'); printf("一共输入了%d个数字 你可以用编译原理的有限自动机的思想(再写一个函数也行) intarr[i]); return 0;} intarr); for (i=0; i<count; i++) printf("%d/n" buff); count = func(buff count = 0; printf("intput: "); scanf("%s" s - start); intarr[count++] = atoi(intstr); s++; } return count;}int main(){ char *s = "abc2345v345fdf678jdfg945"; char buff[512]; int intarr[512]; int i start 20); start = s; while( (*s >= '0') && (*s <= '9') ) s++; memcpy(intstr 0 int intarr[]){ char intstr[20]; char *start; int count = 0; while (*s) { if ((*s < '0') || (*s > '9')) { s++; continue; } memset(intstr num); /*原来vc是识别中文的 至于工作函数 只要设计好规则就行了(数字入队 这样就比较容易了 我可以给你点提示 /n" q++) printf("%d " q=a; i<num; i++ i; gets(c); for(; *p ='/0'; p++) if(*p>='0' && *p<='9') { *q=(*p)-'0'; p++; while(*p>='0' && *p<='9') *q=(*q)*10+(*(p++)-'0'); num+=1; q+=1; } for(i=0 num=0 *q=a *p=c; int a[50] 之后按顺序输出就行了 ||| 由于时间紧迫 没办法人老实还是花了点时间写出来了#include <stdio.h>#include <string.h>void main(){ char c[100] 先定议一个字符串 这个很容易的吖 唉 一分都没有 你只要会传递参数就没问题了吧
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值