S接线程序,基于pcm的控制程序

源代码在线查看: s程控接线器.txt

软件大小: 159 K
上传用户: wjm197811
关键词: pcm 程序 接线 控制
下载地址: 免注册下载 普通下载 VIP

相关代码

				/* 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				    {
				       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				             {
				                printf("%d,",pcm1[i]);
				             }
				         exit(0);  /* exit the program */
				       }
				    goto here;  /*  if i=9 */
				}			

相关资源