Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Viewed less than a minute ago

tFNipEMbiszGRT6O

C gcc 12.1.0

Created at 1 minute ago

Created by anonymous

Author

anonymous

1 minute ago

Language

C

Compiler

gcc 12.1.0

Options
Warnings
C99
-pedantic
Raw compiler options
-lm
セオライド・テクノロジー㈱株式会社フィックスターズ
Siv3D

Author

anonymous

1 minute ago

›
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include<stdio.h>
void main(){
float p1,p2;
float *x,*y;
printf("Enter the co-ordinates (x,y) : ");
scanf("%f%f",&p1,&p2);
x = &p1;
y = &p2;
printf("The co-ordinates(%f,%f) lies in quadrant ",*(x),*(y));
if(*x == 0 && *y ==0) {
printf("It is the origin.");
return;
}
if(*x > 0 && *y > 0){
printf("1");
}
else if(*x < 0 && *y > 0){
printf("2");
}
else if(*x < 0 && *y < 0){
printf("3");
}
else printf("4");
return ;
}
›
9
1
2
3
114514
-810

$ gcc prog.c -Wall -Wextra -std=c99 -pedantic -lm
prog.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
    2 | void main(){
      |      ^~~~
Enter the co-ordinates (x,y) : The co-ordinates(114514.000000,-810.000000) lies in quadrant 4
Exit Code:
52
セオライド・テクノロジー㈱株式会社フィックスターズ
Siv3D