當前位置:編程學習大全網 - 編程軟體 - 急!!!高難度c語言編程題,高手請進幫忙!!!

急!!!高難度c語言編程題,高手請進幫忙!!!

很簡單

#include<stdio.h>

void main()

{

int ix,iy;

printf("please input the data of x:");

scanf("%d",&ix);

if(x<-5&&x>0)

printf("the y is :%d",ix);

if(x==0)

{

iy=ix-1;

printf("the y is:%d"&iy);

}

if(x<0&&x<10)

printf("the y is: 1");

printf("input any key to quit!");

gech();

}

這是if的

#include<stdio.h>

void main()

{

int ix,iy,entrance;

printf("input the x:");

scanf("%d",ix);

if(x<-5&&x>0)

entrance=1;

if(x==0)

{

entrance=2;

}

if(x<0&&x<10)

entrance=3;

switch(entrance)

case 1: printf("the y is :%d",ix);break;

case 2: printf("the y is :%d,ix-1");break;

case 3: printf("the y is : 1");break;

printf("input any key to quit!");

getch();

}

就是這個了。

  • 上一篇:哪些是大學裏面最值得學習的軟件?
  • 下一篇:c語言中的素數編程題:計算500-800區間內素數個數,並按從大到小的順序進行加減間隔計算求和。
  • copyright 2024編程學習大全網