• 分享
  • 24计算机3班选择结构课堂程序提交处

  • @ 2025-3-28 9:00:49

123

56 条评论

  • @ 2025-4-15 17:24:11
    #include <stdio.h> //以前做的菜单-对应功能备份
    #include <windows.h> 
    #include <conio.h>
    void ComBlackTest();
    void denglu();
    void qipan();
    void hanois();
    void tellfuncA();
    void Diamond(); 
    void function();
    void menuon();
    void menuoff();
    void jiazai();
    void test();
    void matirx();
    int main()
    {
    	int ping,step;
    	denglu();
    }
    
    void denglu()
    {
    	int pins;
    	printf("| 欢迎使用CYY菜单系统\n| 请输入密码:"); 
    	scanf("%d",&pins);
    		if(pins==114514)
    		{
    			printf("欢迎用户Cyy#-%d\n",pins);
    		 return menuoff();
    		}
    		else
    		{
    		printf("<Worning> 输入的密码错误,请重新输入\n");
    		return denglu();
    		}
    }
    
    void menuoff()
    {
    	int ping;
    printf("==========菜单==========\n");
    printf("[1] 加载计算机配置\n");
    printf("[2] 运行计算机\n");
    printf("[3] 运行菱形图计算\n");
    printf("[4] 四位数比大小\n");
    printf("[5] 矩阵排布测试\n");
    printf("[6] 汉诺塔数学问题\n");
    printf("[7] 生成棋盘\n");
    printf("[8] 检测电脑按键\n");
    printf("========================\n");
    				printf("By Cyy Cmand.command\n");
    				char step = getch();
    				if(step=='1')
    				{
    					return jiazai();
    					ping=1;
    					step=0;
    				}
    				if(step=='2')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    				}
    				if(step=='3')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    				}
    					if(step=='4')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    				}
    						if(step=='5')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    				}
    								if(step=='6')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    				}
    									if(step=='7')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    				}
    									if(step=='8')
    				{
    					printf("<Worning> 你没有权限执行\n");
    					return menuoff();
    					step=0;
    					} 
    				else
    				{
    					printf("你输入的数字有误,或超域限值\n");
    					return menuoff(); 
    				}
    }
    
    void jiazai()
    {
    	int i=1,a=0,ping=1,replace=1;
    	while(replace=1)
    	{
    	i=i+1;
    	while(i==10000000)
    	{
    		a=a+1;
    		i=0;
    		printf("#####加载进度:%d%%\n",a);
    		system("cls");
    	}
    	while(a==100)
    	{
    		printf("加载完成###c/c;preemode'czs//22734\n");
    		return menuon();
    	}
    	}
    }
    
    void function()
    {
    	int x,y,sumA,sumB,sumC,sumD,step;
    		{
    	printf("请输入变量[1]:");
    	scanf("%d",&x);
    	printf("请输入变量[2]:");
    	scanf("%d",&y);
    	sumA=x+y;
    		sumB=x-y;
    			sumC=x*y;
    				sumD=x/y;
    				printf("经计算得出int类型时:\n");
    				printf("加法结果:%d\n",sumA);
    				printf("减法结果:%d\n",sumB);
    				printf("乘法结果:%d\n",sumC);
    				printf("除法结果:%d\n",sumD);
    				printf("- 输入[1]重复这一步操作\n- 输入[2]返回菜单\n");
    				scanf("%d",&step);
    				if(step==1)
    				{
    					step=0;
    					return function();
    				}
    					if(step==2)
    				{
    					step=0;
    					return menuon();
    				}
    				else
    				{
    					printf("输入数值有误重新输入\n"); 
    					scanf("%d",&step);
    						if(step==1)
    				{
    					step=0;
    					return function();
    				}
    					if(step==2)
    				{
    					step=0;
    					return menuon();
    				}
    				}
    				}
    	}
    
    void menuon()
    {
    	int ping;
    printf("=======[菜单-破解]=======\n");
    printf("[1] 加载计算机配置\n");
    printf("[2] 运行计算机\n");
    printf("[3] 运行菱形图计算\n");
    printf("[4] 四位数比大小\n");
    printf("[5] 矩阵排布测试\n");
    printf("[6] 汉诺塔数学问题\n");
    printf("[7] 生成棋盘\n");
    printf("[8] 检测电脑按键\n");
    printf("=========================\n");
    				printf("By Cyy Cmand.command\n");
    				char step = getch();
    				if(step=='1')
    				{
    					return jiazai();
    					ping=1;
    					step=0;
    				}
    				if(step=='2')
    				{
    					return function();
    					step=0;
    				}
    					if(step=='3')
    				{
    					return Diamond();
    					step=0;
    				}
    	             	if(step=='4')
    				{
    					return test();
    					step=0;
    				}
    				 	if(step=='5')
    				{
    					return matirx();
    					step=0;
    				}
    					 	if(step=='6')
    				{
    					return hanois();
    					step=0;
    				}
    					 	if(step=='7')
    				{
    					return qipan();
    					step=0;
    				}
    						 	if(step=='8')
    				{
    				    return ComBlackTest();
    					step=0;
    				}
    				else
    				{
    					printf("你输入的数字有误,或超域限值\n");
    					return menuon(); 
    				}
    
    }
    
    void Diamond()
    {
    	int total_row;
    	int total_column;
    	int row;
    	int column;
    	int ks_tab_num;
    	int ks;
    	printf("请输入菱形的行数(奇数):");
    	scanf("%d",&total_row);
    	if(total_row%2==0)
    	{
    		printf("必须输入奇数!");
    		return; 
    	}
    	total_column=total_row;
    	printf("请输入菱形制表符起始位置个数:");
    	scanf("%d",&ks_tab_num);
    	if((80-ks_tab_num*8)<total_column)
    	{
    		printf("输入的菱形制表符起始位置个数太大,重新输入\n");
    		return; 
    	} 
    	for(row=1;row<=total_row;row++)
    	{
    		for(ks=1;ks<=ks_tab_num;ks++)
    		printf("\t");
    		if(row<(total_row+1)/2+1)
    		{
    			for(column=1;column<=total_column;column++)
    		{
    			if(column>=(total_column+1)/2-(row-1)&&column<=(total_column+1)/2+(row-1))
    			{
    				printf("*");
    			}
    			else
    			{
    				printf(" ");
    			}
    		} 
    	}
    else 
    {
    	for(column=1;column<=total_column;column++)
    	{
    		if(column>=(total_column+1)/2-(total_row-row)&&column<=(total_column+1)/2+(total_row-row))
    		{
    			printf("*");
    		}
    		else
    		{
    			printf(" ");
    		}
    	}
    }
    printf("\n");
    }
    return tellfuncA();
    }
    
    void tellfuncA()
    {
    	printf("按[任意按键]键返回菜单");
    		char step=getch(); 
    		if(step=='1')
    		{
     		return menuon();
    		}
    		else
    		{
    			return menuon();
    		}
    }
    
    
    void test()
    {
    	int max4(int a,int b,int c,int d);
    	int a,b,c,d,max;
    	printf("请输入四位比较大小的数字:");
    	scanf("%d %d %d %d",&a,&b,&c,&d);
    	max=max4(a,b,c,d);
    	printf("最大值为=%d\n",max);
    	return menuon(); 
    }
    
    int max4(int a,int b,int c, int d)
    {
    	int max2(int a,int b);
    	int m;
    	m=max2(a,b);
    		m=max2(m,c);
    			m=max2(m,d);
    			return(m);
    }
    
    int max2(int a,int b)
    {
    	if(a>=b)
    	return a;
    	else
    	return b;
    }
    
    void matirx()
    {
    	int a,b,a2,b3,a3,replace=1;
    	printf("请输入矩阵的长:");
    	scanf("%d",&a);
    		printf("请输入矩阵宽:");
    	scanf("%d",&b);
    	b3=b;
    	a2=a;
    	a3=a;
    	while(replace=1)
    	{
    		if(a>0)
    		{
    			printf("* ");
    			a=a-1;
    		}
    		else{
    			if(a=0,b>1)
    			{
    				printf("\n");
    				a=a2;
    				b=b-1;
    			}
    			else
    			{
    			printf("\n<输出> - 矩阵的长为<%d> 宽为<%d>\n",a3,b3);
    			printf("输入[任意按键]返回菜单");
    			char step=getch();
    			if(step='1')
    			{
    				return menuon();
    			}
    			else	{
    				return menuon();
    			}
    			}
    		}
    	}
    } 
    void hanois()
    {
    	void hanoi(int n,char one,char two,char three);
    	int m;
    	printf("请输入叠塔层数:");
    	scanf("%d",&m);
    	printf("叠塔步骤如下:\n",m);
    	hanoi(m,'A','B','C');
    	printf("\n<command> 步骤如上,自动返回菜单\n");
    	return menuon();
    }
    
    	void hanoi(int n,char one,char two,char three)
    	{
    		void move(char x,char y);
    		if(n==1)
    		move(one,three);
    		else{
    			hanoi(n-1,one,three,two);
    			move(one,three);
    			hanoi(n-1,two,one,three);
    		}
    	}
    	
    	void move(char x,char y)
    	{
    		printf("%c-->%c\n",x,y);
    	}
    	
    	void qipan()
    	{
    	int i,j;
    	for(i=0;i<27;i++)
    	{
    		for(j=0;j<27;j++)
    		{
    			if((i+j)%2==0)
    			{
    			printf("%c%c",0xa8,0x80);
    			printf("%c%c",0xa8,0x80);
    			}
    			else
    			printf("  ");
    		}
    		printf("\n");
    	}
    	return menuon();
    }
    
    void ComBlackTest()
    {
    	int a=0;
    	printf("正在检索...请输入...");
    	while(a<100)
    	{
    	char text = getch();
    	printf("输出#%c#---按数字0退出测试\n",text);
    	a++;
    	if(text=='0')
    	{
    		a=101;
    	} 
    	}
    	if(a>100)
    	{
    		printf("已退出测试");
    		return menuon();
    	}
    }
    
    
    • @ 2025-4-15 17:18:07
      #include <stdio.h> // 对于菜单动画进行的处理
      
      #include <windows.h>
      void camera_1();
      
      void camera_1()
      {
      	int cameras=0;
      	while(true)
      	{
      		cameras++;
      		switch(cameras)
      		{
      			case 1:system("cls");printf("*");Sleep(20);break;
      			case 2:system("cls");printf("*-");Sleep(10);break;
      			case 3:system("cls");printf("*--");Sleep(10);break;
      			case 4:system("cls");printf("*---");Sleep(10);break;
      			case 5:system("cls");printf("*----");Sleep(10);break;
      			case 6:system("cls");printf("*-----");Sleep(10);break;
      			case 7:system("cls");printf("*------");Sleep(10);break;
      			case 8:system("cls");printf("*-------");Sleep(10);break;
      			case 9:system("cls");printf("*--------");Sleep(10);break;
      			case 10:system("cls");printf("*---------");Sleep(10);break;
      			case 11:system("cls");printf("*----------");Sleep(10);break;
      			case 12:system("cls");printf("*-----------");Sleep(10);break;
      			case 13:system("cls");printf("*------------");Sleep(10);break;
      			case 14:system("cls");printf("*-------------");Sleep(10);break;
      			case 15:system("cls");printf("*--------------");Sleep(10);break;
      			case 16:system("cls");printf("*---------------");Sleep(10);break;
      			case 17:system("cls");printf("*----------------");Sleep(10);break;
      			case 18:system("cls");printf("*-----------------");Sleep(10);break;
      			case 19:system("cls");printf("*-----------------*");Sleep(50);break;
      			case 20:system("cls");printf("*--------|--------*");Sleep(20);break;
      			case 21:system("cls");printf("*-------<|>-------*");Sleep(20);break;
      			case 22:system("cls");printf("*------<<|>>------*");Sleep(20);break;
      			case 23:system("cls");printf("*-----<<<|>>>-----*");Sleep(20);break;
      			case 24:system("cls");printf("*----<<<<|>>>>----*");Sleep(20);break;
      			case 25:system("cls");printf("*---<<<<<|>>>>>---*");Sleep(20);break;
      			case 26:system("cls");printf("*--<<<<<<|>>>>>>--*");Sleep(20);break;
      			case 27:system("cls");printf("*-<<<<<<<|>>>>>>>-*");Sleep(20);break;
      			case 28:system("cls");printf("*<<<<<<<<|>>>>>>>>*");Sleep(20);break;
      			case 29:system("cls");printf("*<<<<-       ->>>>*");Sleep(20);break;
      			case 30:system("cls");printf("*<--           -->*");Sleep(20);break;
      			case 31:system("cls");printf("*        M        *");Sleep(20);break;
      			case 32:system("cls");printf("*        Me       *");Sleep(20);break;
      			case 33:system("cls");printf("*       Men       *");Sleep(20);break;
      			case 34:system("cls");printf("*       Menu       *\n|     GUD游戏      |");Sleep(20);break;
      			case 35:system("cls");printf("*       Menu       *\n|     GUD游戏      |\n|     暂未开放     |");Sleep(20);break;
      			case 36:system("cls");printf("*       Menu       *\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |");Sleep(20);break;  
      			case 37:system("cls");printf("*       Menu       *\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |");Sleep(20);break;
      			case 38:system("cls");printf("*>>     Menu     <<*\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |\n*>>              <<*");Sleep(20);break;
      			case 39:system("cls");printf("*-->>   Menu   <<--*\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |\n*-->>          <<--*");Sleep(20);break;
      			case 40:system("cls");printf("*---->  Menu  <----*\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |\n*---->>      <<----*");Sleep(20);break;
      			case 41:system("cls");printf("*-----> Menu <-----*\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |\n*------>    <------*");Sleep(20);break;
      			case 42:system("cls");printf("*------>Menu<------*\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |\n*--------><--------*");Sleep(20);break;
      			case 43:system("cls");printf("*------<Menu>------*\n|     GUD游戏      |\n|     暂未开放     |\n|     暂未开放     |\n|     暂未开放     |\n*------------------*");Sleep(20);break;
      			
      		}
      	}
       } 
       
       
       int main()
       {
       	camera_1();
        } 
      
      
      • @ 2025-3-28 10:25:26

        123

        • @ 2025-3-28 10:25:21

          123

          • @ 2025-3-28 10:25:16

            123

            • @ 2025-3-28 10:25:10

              123

              • @ 2025-3-28 10:25:05

                123

                • @ 2025-3-28 10:21:01

                  123

                  • @ 2025-3-28 10:19:35

                    123

                    • @ 2025-3-28 9:35:56
                      #include<stdio.h>
                      int main(){
                      	char a;
                      	printf("请输入一个字符:");
                      	scanf("%c",&a);
                      	if(a>='0' && a<='9'){
                      		printf("%c它是一个数字字符\n",a);
                      	}else if(a>='a' && a<='z' || a>='A' && a<='Z'){
                      		//if(a>='a' && a<='z') || (a>='A' && a<='Z'))
                      		printf("%c它是一个字母字符\n",a);
                      	}else{
                      		printf("%c它是其它字符\n",a);
                      	} 
                      	return 0;
                      }
                      
                      
                      • @ 2025-3-28 9:15:41
                        //空心菱形
                        #include <stdio.h>
                        int main()
                        {
                        	int rows;
                        	scanf("%d",&rows);
                        	for(int i=1;i<=rows;i++)
                        	{
                        		for(int space=1;space<=rows-i;space++)
                        		{
                        			printf(" ");
                        		}
                        			printf("*");
                        			for(int space=1;space<=2*i-3;space++)
                        			{
                        				printf(" ");
                        			}
                        			if(i!=1)
                        			{
                        				printf("*");
                        			}
                        		printf("\n");
                        	}
                        	for(int i=rows-1;i>=1;i--)
                        	{
                        		for(int space=1;space<=rows-i;space++)
                        		{
                        			printf(" ");
                        		}
                        			printf("*");
                        			for(int space=1;space<=2*i-3;space++)
                        			{
                        				printf(" ");
                        			}
                        			if(i!=1)
                        			{
                        				printf("*");
                        			}
                        		printf("\n");
                        	}
                        	return 0;
                        }
                        
                        ❤️ 5
                        👍 2
                        👎 2
                        🤔 1
                        😄 1
                        😕 1
                        🤣 1
                        🌿 1
                        🍋 1
                        🕊️ 1
                        👀 1
                        🤡 1
                        • @ 2025-3-28 9:15:38
                          #include<stdio.h>
                          int main(){
                          	int x,y;
                          	scanf("%d",&x);
                          	if(x>=0){
                          		if(x>0){
                          			y=1;
                          		}else{
                          			y=0;
                          		}
                          	}else{
                          		y=-1;
                          	}
                          	printf("%d",y);
                          	return 0;
                          }
                          
                          • @ 2025-3-28 9:15:27
                            #include<stdio.h>
                            int main(){
                            	int a,b,max;
                            	printf("请输入两个整数: 求它们的最大值\n");
                            	scanf("%d,%d",&a,&b);
                            	max = a;
                            	if(b>max){
                            		max = b;
                            	}
                            	printf("最大的数是%d",max);
                            	return 0;
                            }
                            
                            • @ 2025-3-28 9:15:26
                              #include<stdio.h>
                              int main(){
                              	int x,y;
                              	scanf("%d",&x);
                              	if(x>=0){
                              		if(x > 0){
                              			y = 1;
                              		}else{
                              			y = 0;
                              		}
                              	}else{
                              		y = -1;
                              	}
                              	printf("%d",y);
                              	return 0;
                              } 
                              
                              • @ 2025-3-28 9:15:26
                                #include<stdio.h>
                                int main(){
                                	int x,y;
                                	scanf("%d",&x);
                                	if(x>=0){
                                		if(x > 0){
                                			y = 1;
                                		}else{
                                			y = 0;
                                		}
                                	}else{
                                		y = -1;
                                	}
                                	printf("%d",y);
                                	return 0;
                                }
                                • @ 2025-3-28 9:15:26
                                  #include<stdio.h>
                                  int main(){
                                  	int a,b,max;
                                  	printf("请输入两个整数:求它们的最大值\n");
                                  	scanf("%d,%d",&a,&b);
                                  	max a;
                                  	if(b>max){
                                  		max=b;
                                  	} 
                                  	printf("最大的数是%d",max);
                                  	return 0;
                                  }
                                  • @ 2025-3-28 9:15:19
                                    #include<stdio.h>
                                    int main(){
                                    	int x,y;
                                    	scanf("%d",&x);
                                    	if(x>=0){
                                    		if(x > 0){
                                    			y = 1;
                                    	}else{
                                    		y = 0;
                                    	 }
                                    	}else{
                                    		y = -1;
                                    	}
                                    	printf("%d",y);
                                    	return 0;
                                    }
                                    
                                    • @ 2025-3-28 9:15:19
                                      #include<stdio.h>
                                      int main(){
                                      	int x,y;
                                      	scanf("%d",&x);
                                      	if(x>=0){
                                      		if(x > 0){
                                      			y = 1; 	
                                      		}else{
                                      			y = 0;
                                      		}
                                      	}else{
                                      		y = -1;
                                      	}
                                      	printf("%d",y);
                                      	return 0;
                                      }
                                      
                                      • @ 2025-3-28 9:15:18
                                        #include <stdio.h>
                                        int main(){
                                        	int x,y;
                                        	scanf("%d",&x);
                                        	if(x>=0){
                                        		if(x>0){
                                        		y=1;
                                        		}else{
                                        			y=0;
                                        		}
                                        	}else{
                                        		y=-1;
                                        	}
                                        	printf("%d",y);
                                        return 0;
                                        }
                                        • @ 2025-3-28 9:15:17
                                          
                                          #include <stdio.h>
                                          int main(){
                                          	int a,b,max;
                                          	printf("请输入两个整数:求他们得最大值\n");
                                          	scanf("%d,%d",&a,&b);
                                          	max=a;
                                          	if(b>max){
                                          		max=b;
                                          	}
                                          	printf("最大的数是%d",max);
                                          	return 0;
                                          }
                                          
                                          • @ 2025-3-28 9:15:16
                                            #include<stdio.h>
                                            int main(){
                                            	int x,y;
                                            	scanf("%d",&x);
                                            	if(x>=0){
                                            		if(x>0){
                                            			y=1;
                                            		}else{
                                            			y=0;
                                            		}
                                            	}else{
                                            		y=-1;
                                            	}
                                            	printf("%d",y);
                                            	return 0;
                                            }
                                            
                                            • @ 2025-3-28 9:15:14
                                              #include<stdio.h>
                                              int main(){
                                              	int a,b,max;
                                              	printf("请输入两个整数:求他们的最大值\n");
                                              	scanf("%d,%d",&a,&b);
                                              	max = a;
                                              	if(b>max){
                                              		max = b;
                                              	} 
                                              	printf("最大的数是%d",max);
                                              	return 0;
                                              }
                                              
                                              • @ 2025-3-28 9:15:14
                                                #include<stdio.h>
                                                int main(){
                                                	int x,y;
                                                	scanf("%d",&x);
                                                	if(x>=0){
                                                		if(x > 0){
                                                			y = 1; 	
                                                		}else{
                                                			y = 0;
                                                		}
                                                	}else{
                                                		y = -1;
                                                	}
                                                	printf("%d",y);
                                                	return 0;
                                                }
                                                
                                                • @ 2025-3-28 9:14:58
                                                  #include<stdio.h>
                                                  int main()
                                                  {
                                                  	int x,y;
                                                  	scanf("%d",&x);
                                                  	if(x>=0){
                                                  		y=1;
                                                  	}else{
                                                  		y=0;
                                                  	}
                                                  	else{
                                                  		y=-1
                                                  	}
                                                  
                                                  	printf("%d",y);
                                                  	return 0;
                                                  }
                                                  
                                                  • @ 2025-3-28 9:14:25

                                                    #include<stdio.h>
                                                    int main(){
                                                    	int x,y;
                                                    	scanf("%d",&x);
                                                    	if(x>=0){
                                                    		if(x > 0){
                                                    			y = 1; 	
                                                    		}else{
                                                    			y = 0;
                                                    		}
                                                    	}else{
                                                    		y = -1;
                                                    	}
                                                    	printf("%d",y);
                                                    	return 0;
                                                    }
                                                    
                                                    • @ 2025-3-28 9:11:43

                                                      '''C #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x > 0){ y = 1; }else{ y = 0; } }else{ y = -1; } printf("%d",y); return 0; } '''

                                                      • @ 2025-3-28 9:10:17
                                                         #include<stdio.h>
                                                         int main()
                                                         {
                                                         	int N,y;
                                                        	scanf("%d",&N);
                                                        	if(N>=0)
                                                        	{
                                                        		if(N>0)
                                                        		printf("positive\n");
                                                        		else
                                                        		printf("zero\n");
                                                        	} 
                                                        	else
                                                        	printf("negative\n");	
                                                        	return 0;
                                                         }
                                                        
                                                        
                                                        • @ 2025-3-28 9:09:17

                                                          #include<stdio.h> int main(){ int a,b,max; printf("请输入两个整数:求它们的最大值\n"); scanf("%d,%d",&a,&b); max a; if(b>max){ max=b; } printf("最大的数是%d",max); return 0; }

                                                          • @ 2025-3-28 9:07:50

                                                            #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x>0){ y=1; }else{ y=0; } }else{ y=-1; } printf("%d",y); return 0; }```

                                                            • @ 2025-3-28 9:06:03

                                                              #include<stdio.h>> - 1. 1. - > int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x > 0){ y = 1; }else{ y = 0; } }else{ y = -1; } printf("%d",y); return 0; }

                                                              • @ 2025-3-28 9:05:56

                                                                #include<stdio.h> int main(){ int a,b,max; printf("请输入两个整数:求它们的最大值\n"); scanf("%d,%d",&a,&b); max = a; if(b>max){ max = b; } printf("最大的数是%d",max); return 0; }

                                                                • @ 2025-3-28 9:05:50
                                                                  
                                                                  

                                                                  #include <stdio.h> int main() { int rows; scanf("%d",&rows); for(int i=1;i<=rows;i++) { for(int space=1;space<=rows-i;space++) { printf(" "); } printf(""); for(int space=1;space<=2i-3;space++) { printf(" "); } if(i!=1) { printf(""); } printf("\n"); } for(int i=rows-1;i>=1;i--) { for(int space=1;space<=rows-i;space++) { printf(" "); } printf(""); for(int space=1;space<=2i-3;space++) { printf(" "); } if(i!=1) { printf(""); } printf("\n"); } return 0;

                                                                  • @ 2025-3-28 9:05:49

                                                                    #include <stdio.h> int main(){ int a,b,max; printf("请输入两个整数:求他们得最大值\n"); scanf("%d,%d",&a,&b); max=a; if(b>max){ max=b; } printf("最大的数是%d",max); return 0; }

                                                                    • @ 2025-3-28 9:05:44

                                                                      #include<stdio.h> int main(){ int a,b,max; printf("请输入两个整数:求他们的最大值\n"); scanf("%d,%d",&a,&b); max = a; if(b>max){ max = b; } printf("最大的数是%d",max); return 0; }

                                                                      • @ 2025-3-28 9:05:43
                                                                        #include<stdio.h>
                                                                        int main(){
                                                                        	int x,y;
                                                                        	scanf("%d",&x);
                                                                        	if(x>=0){
                                                                        		if(x>0){
                                                                        			y=1;
                                                                        		}else{
                                                                        			y=0;
                                                                        		}
                                                                        	}else{
                                                                        		y=-1;
                                                                        	}
                                                                        	printf("%d",y);
                                                                        	return 0;1
                                                                        }
                                                                        
                                                                        • @ 2025-3-28 9:05:17
                                                                          #include<stdio.h>
                                                                          int main(){
                                                                          	int a,b,max;
                                                                          	printf("请输入两个整数:求它们的最大值\n");
                                                                          	scanf("%d,%d",&a,&b);
                                                                          	max=a;
                                                                          	if(b>max){
                                                                          		max=b;
                                                                          	} 
                                                                          	printf("最大的数是%d",max);
                                                                          	return 0;
                                                                          }
                                                                          
                                                                          • @ 2025-3-28 9:05:17

                                                                            • @ 2025-3-28 9:05:10

                                                                              #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x>0){ y=1; }else{ y=0; } }else{ y=-1; } printf("%d",y); return 0; }

                                                                              • @ 2025-3-28 9:05:07

                                                                                #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x > 0){ y = 1; }else{ y = 0; } }else{ y = -1; } printf("%d",y); return 0; }

                                                                                • @ 2025-3-28 9:04:49

                                                                                  #include<stdio.h> int main(){ int a,b,max; printf("请输入两个整数:求它们的最大值\n"); scanf("%d,%d",&a,&b); max = a; if(b>max){ max = b; } printf("最大的数是%d",max); return 0; }

                                                                                  • @ 2025-3-28 9:04:42

                                                                                    #include <stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x>0){ y=1; }else{ y=0; } }else{ y=-1; } printf("%d",y); return 0; }

                                                                                    • @ 2025-3-28 9:04:41

                                                                                      #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x > 0){ y = 1; }else{ y = 0; } }else{ y = -1; } printf("%d",y); return 0; }

                                                                                      • @ 2025-3-28 9:04:12

                                                                                        #include<stdio.h> int main(){ int x,y; scanf("%d",&x) ; if(x>=0){ if(x>0){ y=1; }else{ y=0; } }else{ y=-1; } printf("%d",y); return 0; }

                                                                                        • @ 2025-3-28 9:04:10

                                                                                          #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x>0){ y=1; }else{ y=0; } }else{ y=-1; } printf("%d",y); return 0; }

                                                                                          • @ 2025-3-28 9:04:04
                                                                                             #include<stdio.h>
                                                                                             int main()
                                                                                             {
                                                                                             	int x,y;
                                                                                            	scanf("%d",&x);
                                                                                            	if(x>=0)
                                                                                            	{
                                                                                            		if(x>0)
                                                                                            		y=1;
                                                                                            		else
                                                                                            		y=0;
                                                                                            	} 
                                                                                            	else
                                                                                            	y=-1;
                                                                                            	printf("%d",y);
                                                                                            	return 0;
                                                                                             }
                                                                                            
                                                                                            
                                                                                            • @ 2025-3-28 9:03:59
                                                                                              #include<stdio.h>
                                                                                              int main(){
                                                                                              	int x,y;
                                                                                              	scanf("%d",&x);
                                                                                              	if(x>=0){
                                                                                              		if(x > 0){
                                                                                              			y = 1;
                                                                                              		}else{
                                                                                              			y = 0;
                                                                                              		}  
                                                                                              	}else{
                                                                                              	 	y = -1;
                                                                                              	}
                                                                                              	printf("%d",y);
                                                                                              	return 0;
                                                                                              }
                                                                                              
                                                                                              • @ 2025-3-28 9:03:56

                                                                                                #include<stdio.h> int main(){ int x,y; scanf("%d",&x); if(x>=0){ if(x>0){ y=1; }else{ y=0; } }else{ y=-1; } printf("%d",y); return 0; }

                                                                                                • @ 2025-3-28 9:03:53
                                                                                                  #include<stdio.h>
                                                                                                  int main(){
                                                                                                  	int x,y;
                                                                                                  	scanf("%d",&x);
                                                                                                  	if(x>=0){
                                                                                                  		if(x > 0){
                                                                                                  			y = 1;
                                                                                                  		}else{
                                                                                                  			y = 0;
                                                                                                  		}
                                                                                                      }else{
                                                                                                      	y = -1;
                                                                                                      }
                                                                                                      printf("%d",y);
                                                                                                      return 0;
                                                                                                  }
                                                                                                  • @ 2025-3-28 9:03:52
                                                                                                    #include<stdio.h>
                                                                                                     int main()
                                                                                                     {
                                                                                                     	int a,b,max;
                                                                                                    	printf("请输入来两个整数求它们的最大值:\n");
                                                                                                    	scanf("%d,%d",&a,&b);
                                                                                                    	max=a;
                                                                                                    	if(b>max)
                                                                                                    	max=b;
                                                                                                    	printf("最大的数是:%d",max); 
                                                                                                    	return 0;
                                                                                                     }
                                                                                                    
                                                                                                    
                                                                                                    • @ 2025-3-28 9:03:39
                                                                                                      #include<stdio.h>
                                                                                                      int main(){
                                                                                                      	int x,y;
                                                                                                      	scanf("%d",&x);
                                                                                                      	if(x>=0){
                                                                                                      		if(x > 0){
                                                                                                      			y = 1;
                                                                                                      		}else{
                                                                                                      			y = 0;
                                                                                                      		}
                                                                                                      	}else{
                                                                                                      		y = -1;
                                                                                                      	}
                                                                                                      	printf("%d",y);
                                                                                                      	return 0;
                                                                                                      }