Beecrowd Problem 1041-1060 Solve by C
Beecrowd Problem 1041
Beecrowd Problem 1042
Beecrowd Problem 1043
#include <stdio.h>
int main() {
int X, Y;
float price = 0;
scanf("%d %d", &X, &Y);
if (X == 1) {
price = (float) (4.00 * Y); }
else if (X == 2) {
price = (float) (4.50 * Y); }
else if (X == 3) {
price = (float) (5.00 * Y); }
else if (X == 4) {
price = (float) (2.00 * Y); }
else if (X == 5) {
price = (float) (1.50 * Y); }
printf("Total: R$ %.2f\n", price);
return 0; }
Beecrowd Problem 1044
#include <stdio.h> int main() { int num_a, num_b; scanf("%d %d", &num_a, &num_b); if (num_b % num_a == 0 || num_a % num_b == 0) { printf("Sao Multiplos\n"); } else { printf("Nao sao Multiplos\n"); } return 0; }
Beecrowd Problem 1045
Beecrowd Problem 1046
Beecrowd Problem 1047
Beecrowd Problem 1048
Beecrowd Problem 1049
Beecrowd Problem 1050
Beecrowd Problem 1051
#include <stdio.h> int main(){ double sal; scanf("%lf", &sal); if(sal <= 2000.00){ printf("Isento\n"); }else if (sal >= 2000.01 && sal <= 3000.00){ printf("R$ %.2f\n", (sal - 2000.00)*0.08); }else if (sal >= 3000.01 && sal <= 4500.00){ printf("R$ %.2f\n", ((sal - 3000.00)*0.18 + 1000.00*0.08)); }else if (sal >= 4500.01){ printf("R$ %.2f\n", ((sal - 4500.00)*0.28 + 1500.00*0.18 + 1000.00*0.08)); } return 0; }
Beecrowd Problem 1052
#include<stdio.h> int main() { int N; scanf("%d", &N); if(N == 1) printf("January\n"); else if (N == 2) printf("February\n"); else if (N == 3) printf("March\n"); else if (N == 4) printf("April\n"); else if (N == 5) printf("May\n"); else if (N == 6) printf("June\n"); else if (N == 7) printf("July\n"); else if (N == 8) printf("August\n"); else if (N == 9) printf("September\n"); else if (N == 10) printf("October\n"); else if (N == 11) printf("November\n"); else if (N == 12) printf("December\n"); return 0; }
Beecrowd Problem 1053
Beecrowd Problem 1054
Beecrowd Problem 1055
Beecrowd Problem 1056
Beecrowd Problem 1057
Beecrowd Problem 1058
Beecrowd Problem 1059
#include <stdio.h> int main() { int i; for(i=2; i<=100; i=i+2) { printf("%d\n",i); } return 0; }
Beecrowd Problem 1060
#include<stdio.h> int main() { float x; int i,sum=0; for(i=1;i<=6;i++){ scanf("%f",&x); if(x>0){ sum=sum+1; } } printf("%d valores positivos\n",sum); return 0;//end line }
Leave a Reply