//1405
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 26 | #include<stdio.h> #include<stdlib.h> int main() { int num[1000]; int num1,num2,i,j=0,temp=0; scanf_s("%d", &num1); //5 for (i = 0; i < num1; i++) { scanf_s("%d", &num2); num[i] = num2; } for (i = 0; i < num1; i++) { printf("%d ", num[0]); temp = num[0]; //0 for (j = 1; j < num1; j++) { num[j-1] = num[j]; printf("%d ", num[j]); } num[num1-1] = temp; //4 printf("\n"); } system("pause"); return 0; } | cs |
//1409
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include<stdio.h> #include<stdlib.h> int main() { int arr[10]; int num,num1,i; for (i = 0; i < 10; i++) { scanf_s("%d", &num); arr[i] = num; } scanf_s("%d", &num1); printf("%d", arr[num1 - 1]); system("pause"); return 0; } | cs |
//1566
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <stdio.h> #include<stdlib.h> int a, n; long long int pow(int a, int n); int main() { scanf_s("%d%d", &a, &n); printf("%lld\n", pow(a,n)); system("pause"); } long long int pow(int a, int n) { long long int expo = 1,i; for (i = 1; i <= n; i++) { expo *= a; } return expo; } | cs |
//1580
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include<stdio.h> #include<stdlib.h> float circle(int banzi); int main() { float banzi; scanf_s("%f", &banzi); printf("%.2f", circle(banzi)); system("pause"); return 0; } float circle(int banzi) { float banzi2=0; banzi2 = (float)banzi * banzi*3.14; return banzi2; } | cs |