强人快快来 快快来

[复制链接]
查看11 | 回复3 | 2008-7-26 20:03:59 | 显示全部楼层 |阅读模式
输入4个数```要求输出但是输出时每两个间要有空格:
如果输入1904 要输出1 9 0 4
要用自定义函数哦,,
说清楚,,我不是会懂德哦

回复

使用道具 举报

千问 | 2008-7-26 20:03:59 | 显示全部楼层
用自定义函数??啥意思?调用函数吗?空格你在输出的时候自己打上去就行了#include void input();void input(){int a,b,c,d;printf("请输入4个数");scanf("%d%d%d%d",a,b,c,d);}void main(){void input();printf("%d %d %d %d ",a,b,c,d);}
回复

使用道具 举报

千问 | 2008-7-26 20:03:59 | 显示全部楼层
#include void main(){ char szResult[80] = {0}; int iTemp; int iCount = 0; while ( iCount++void print(char *a){printf("%2c%2c%2c%2c",a[0],a[1],a[2],a[3]);}main() {char a[4]; scanf("%c%c%c%c",&a[0],
回复

使用道具 举报

千问 | 2008-7-26 20:03:59 | 显示全部楼层
在DEV C++中写的.#include#includeusing namespace std;int main(){
string str;
cin >> str;
cout<<str[0]<<" "<<str[1]<<" "<<str[2]<<" "<<st
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行