如何将C语言代码改为C++ 15
printf("%s-----请输入你想要的休息日(1-7):",p->name);scanf("%d",&p->day[i]);printf("%s%s%s%s%s%s...
printf("%s-----请输入你想要的休息日(1-7):",p->name);
scanf("%d",&p->day[i]);
printf("%s %s %s %s %s %s %s\n\n\n",xingqi[y[0]],xingqi[y[1]],xingqi[y[2]],xingqi[y[3]],xingqi[y[4]],xingqi[y[5]],xingqi[y[6]]);
还有教一下怎么改 展开
scanf("%d",&p->day[i]);
printf("%s %s %s %s %s %s %s\n\n\n",xingqi[y[0]],xingqi[y[1]],xingqi[y[2]],xingqi[y[3]],xingqi[y[4]],xingqi[y[5]],xingqi[y[6]]);
还有教一下怎么改 展开
3个回答
2014-03-31
展开全部
C++一般用cin和cout来输入、输出。
cout<<"请输入你想要的休息日(1-7)";
cin>>p->day[0];
cin>>p->day[1];
......
cout<<xingqi[y[0]];
.......
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
cout<<"-----请输入你想要的休息日(1-7):";
cin<<p->name;
cin<<p->day[i];
cout<<xingqi[y[0]]<<xingqi[y[1]]<<" "<<xingqi[y[2]]<<" "<<xingqi[y[3]]<<" "<<xingqi[y[4]]<<" "<<xingqi[y[5]]<<" "<<xingqi[y[6]];
cin<<p->name;
cin<<p->day[i];
cout<<xingqi[y[0]]<<xingqi[y[1]]<<" "<<xingqi[y[2]]<<" "<<xingqi[y[3]]<<" "<<xingqi[y[4]]<<" "<<xingqi[y[5]]<<" "<<xingqi[y[6]];
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2014-04-01
展开全部
cout<<p->name<<"-----请输入你想要的休息日(1-7):";
cin>>&p->day[i];
for(int i=0; i<7; ++i)
{
cout<<xingqi[y[i]];
}
cout<<endl;
cin>>&p->day[i];
for(int i=0; i<7; ++i)
{
cout<<xingqi[y[i]];
}
cout<<endl;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询