📄 s程控接线器.txt
字号:
/* s programable rectifier */
#include "stdio.h" /* head file */
main() /* main function */
{
int n=0,i=0; /* define two vars */
int pcm[9]={0,1,2,3,4,5,6,7,8},pcm1[9]; /* define two arrays */
printf("the inatialize of the pcm is :\n");
for(;i<=8;i++) /* output the message of the input pcm */
{
printf("%d,",pcm[i]);
}
i=0; /* recorver i value */
/* get the new value of the output pcm1 */
here:
printf("\n now,%d time is coming,please enter the way the data to go.",i+1);
n=(getchar()-48); /* getchar derive asc code ,char ,so ,need to decrease 48,to */ /* change to D */
getchar(); /* derive the \n */
/* printf("%d,",n); */
pcm1[n]=pcm[i]; /* message passes cm to go to new output pcm */
i++; /* i add 1 */
/* output the new value of the output pcm */
if (i>=9)
{
printf("\nafter CM ,the new value of the pcm is:\n ");
for (i=0;i<=8;i++)
{
printf("%d,",pcm1[i]);
}
exit(0); /* exit the program */
}
goto here; /* if i<=9 then jump to the signal here to repeat,until i>=9 */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -