[ create a new paste ] login | about

Link: http://codepad.org/BJq0yo1K    [ raw code | output | fork ]

C, pasted on May 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<stdio.h>
int main(void){
  int x[3];
  int y;
  int i;
  for (i=0;i<=2;i=i+1){
    printf("xを入力してください\n");
    scanf("%d",&x[i]);
  }
  printf("yを入力してください\n");
  scanf("%d",&y);
  if(x[0]==y || x[1]==y || x[2]==y) {
    printf("○\n");}
  else{
    printf(\n");
  }
  return 0;
}


Output:
1
2
3
4
5
xを入力してください
xを入力してください
xを入力してください
yを入力してください
×


Create a new paste based on this one


Comments: