#include <stdio.h>
void zhengzhuan(int x, char *str1);
void fanzhuan(int y,char *str2);
void dingshi(int t,char *str3);
bool Zkaiguan;
void main()
{
int a1;//起步转的圈数
int b2;//间距距离圈数
int c3;//间隔数目
int d4;//电机2需要转的圈数
int e5;//电机3需要转的圈数
int f6;//电机2定时秒
int g7;//电机3定时秒
printf("请输入起步转的圈数\n");
scanf("%d",&a1);
printf("请输入间距距离圈数\n");
scanf("%d",&b2);
printf("请输入间隔数目\n");
scanf("%d",&c3);
printf("请输入电机2需要转的圈数\n");
scanf("%d",&d4);
printf("请输入电机3需要转的圈数\n");
scanf("%d",&e5);
printf("请输入电机2定时秒\n");
scanf("%d",&f6);
printf("请输入电机3定时秒\n");
scanf("%d",&g7);
Zkaiguan = true;//true为真,false为假
while(1)
{
if(Zkaiguan)
{
int b22 = b2;
for(int p = 1; p <= c3; p++)
{
zhengzhuan(e5 ,"电机3-");
dingshi(g7 ,"电机3-");
fanzhuan(e5 ,"电机3-");
printf("\n\n");
zhengzhuan(a1 + b2,"电机1-");
printf("\n\n");
zhengzhuan(d4 ,"电机2-");
dingshi(f6 ,"电机-2");
fanzhuan(d4 ,"电机2-");
printf("\n\n");
fanzhuan(a1 + b2,"电机1-");
printf("\n\n");
printf("B2的值等于%d, p==%d, a1+b2等于%d\n",b2,p,a1+b2);
b2 = b22 * (p + 1);
if(p == c3){Zkaiguan = false;}
}
}//if1
}//while
getchar();
}
void dingshi(int t,char *str3)
{
printf("\n%s定时%d秒\n",str3,t);
}
void zhengzhuan(int x, char *str1)
{
for (int i = 1;i <= x; i++)
{
printf("%s正转%d次",str1,i);
}
}
void fanzhuan(int y, char *str2)
{
for (int i = 1;i <= y; i++)
{
printf("%s反转%d次",str2,i);
}
}
请问下作者能帮我开发出带这种功能的项目么?请问如何可联系到LZ本人呢? |