#include <iomanip> using namespace" /> #include <iomanip> using namespace" />

Beecrowd 1174 – Array Selection I Solution in C/Cpp

Question link Beecrowd 1174 – Array Selection I Solution in C #include <stdio.h> int main() { double A[100];int i; for(i=0;i<100;i++){ scanf(“%lf”,&A[i]); } for(i=0;i<100;i++){ if(A[i]<=10){ printf(“A[%d] = %.1lf\n”,i,A[i]);//Beecrowd 1174 – Array Selection I } } return 0; } Beecrowd 1174 – Array Selection I Solution in CPP #include <iostream> #include <iomanip> using namespace std; int main() … Read more

How do you use Scanf to enter integers into the array in C?

How do you use Scanf to enter integers into the array in C?

How do you use Scanf to enter integers into the array in C? #include <stdio.h> int main() { int i, n; printf(“Enter the number of integers you want to enter: “); scanf(“%d”, &n); int arr[n]; printf(“Enter %d integers: “, n); for (i = 0; i < n; i++) { scanf(“%d”, &arr[i]); } printf(“You entered: “); … Read more

Uri 1173 Solution || Beecrowd 1173 – Array fill I solution in C,CPP

Uri 1173 Solution

Uri 1173 Solution || Beecrowd 1173 – Array fill I solution Question link: Beecrowd 1173 – Array fill I solution in C #include <stdio.h>int main() { int N[10],i,d; scanf(“%d”,&d); for(i=0;i<10;i++){ N[i]=d; printf(“N[%d] = %d\n”,i,d);d*=2; } return 0;} Beecrowd 1173 – Array fill I solution in C++ Beecrowd 1173 – Array fill I solution in Python … Read more

Uri 1172 solution || Beecrowd 1172 – Array Replacement I solution in C , Python || Free Code Center

Uri 1172 solution

Uri 1172 Solution || Beecrowd 1172 – Array Replacement I solution Question link: Beecrowd 1172 – Array Replacement I solution in C #include <stdio.h> int main() { int X[10],i; for(i=0;i<10;i++){ scanf(“%d”,&X[i]); } for(i=0;i<10;i++){ if(X[i]==0||X[i]<0) {X[i]=1;} } for(i=0;i<10;i++){ printf(“X[%d] = %d\n”,i,X[i]); } return 0; } Beecrowd 1172 – Array Replacement I solution in Python def main(): … Read more

Beecrowd 1099 – Sum of Consecutive Odd Numbers II solution in C, Python

Beecrowd 1099

Beecrowd 1099 – Sum of Consecutive Odd Numbers II solution in C Question Link Solution in C #include <stdio.h> int main() { int n,x,y,i,j,sum=0,temp=0; scanf(“%d”,&n); for(i=0;i<n;i++){ scanf(“%d %d”,&x,&y); if(x>y){ temp=x; x=y; y=temp; } if(x%2==0){ x–; } x+=2; for(j=x;j<y;j+=2){ sum=sum+j; } printf(“%d\n”,sum); sum=0; } return 0; } Beecrowd 1099 – Sum of Consecutive Odd Numbers II … Read more

Unsigned long int in C language

How can I print an unsigned long int in C language? To print an unsigned long integer in C language, you can use the %lu format specifier in the printf() function. Here’s an example code snippet: #include <stdio.h> int main() { unsigned long int num = 1234567890123456; printf(“The number is: %lu\n”, num); return 0; } … Read more

Codeforces Bear and Big Brother solution

Codeforces Problem 791/A. Bear and Big Brother solution with CPP

Codeforces Problem 791/A. Bear and Big Brother solution with CPP 100% Accepted Before seeking assistance, it is advisable to make an effort to solve the problem yourself. This can involve researching the problem online, reviewing relevant documentation, and attempting to apply your knowledge to find a solution. By trying to solve the problem first, you … Read more

Uri 1159 Solution || Beecrowd 1159 Solution

Uri 1159 Solution

Question Uri 1159 Solution || Beecrowd 1159 Solution ||Sum of Consecutive Even Numbers solution in C The program must read an integer X indefinite times (stop when X=0). For each X, print the sum of five consecutive even numbers from X, including it if X is even. If the input number is 4, for example, the output must be 40, that is … Read more

Uri 1094 Solution || Beecrowd 1094 – Experiments solution in C

Uri 1094 Solution

Uri 1094 solution || Beecrowd 1094 – Experiments solution in C Uri 1094 Question And Submission link Experiments Beecrowd 1094/Uri 1094 Solution in C #include <stdio.h> int main() { char cat; int n,i,cob,coe=0,rat=0,sap=0,sum=0; scanf(“%d”,&n); for(i=0;i<n;i++){ scanf(“%d %c”,&cob,&cat); if(‘C’==cat){ coe=coe+cob; } else if(‘R’==cat){//Beecrowd 1094 rat=cob+rat; } else if(‘S’==cat){ sap=sap+cob; } } double pcoe=1,prats=1,psap=1; sum=coe+rat+sap; pcoe=(coe/(sum*1.0))*100.00; prats=(rat/(sum*1.0))*100.00; … Read more

Uri 1048 solution in c || Beecrowd 1048 Salary Increase solution in C,CPP

Uri 1048 solution in c

Uri 1048 Solution in c || Beecrowd 1048 Salary Increase Question #include<stdio.h> int main() { float s; scanf(“%f”,&s); if(s>0 && s<=400.0) printf(“Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 15 %%\n”,(s+(s*.15)),(s*.15)); else if(s<=800.0) printf(“Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 12 %%\n”,(s+(s*.12)),(s*.12)); else if(s<=1200.0) printf(“Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 10 %%\n”,(s+(s*.10)),(s*.10)); else if(s<=2000.0) printf(“Novo salario: %.2f\nReajuste ganho: … Read more