Init
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
#define PI 3.14159265358979323846
|
||||
|
||||
int main() {
|
||||
double r;
|
||||
scanf("%lf", &r);
|
||||
printf("%f\n%f", 4 * PI * r * r, PI * r * r * r * 4 / 3);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#define square(x) ((x) * (x))
|
||||
|
||||
int main() {
|
||||
int x1, y1, x2, y2;
|
||||
scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
|
||||
printf("%f", sqrt(square(x2 - x1) + square(y2 - y1)));
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int num;
|
||||
scanf("%d", &num);
|
||||
printf("%d %d %d\n", num / 100, num / 10 % 10, num % 10);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
char a, b;
|
||||
scanf("%c %c", &a, &b);
|
||||
char c = a;
|
||||
a = b;
|
||||
b = c;
|
||||
printf("%c %c", a, b);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
int main(){
|
||||
char c;
|
||||
scanf("%c", &c);
|
||||
printf("%c %c\n%d %d %d", c, c + 1, c - 1, c, c + 1);
|
||||
}
|
||||
Reference in New Issue
Block a user