URI Online Judge (একগাদা সহজ প্রবলেম)

Easy problem URI OJ

URI 1005 (Average 1)

#include <stdio.h>
int main(){
float x,y;
scanf("%f %f", &x, &y);
printf("MEDIA = %.5f\n", (x*3.5+y*7.5)/(3.5+7.5));
return 0;
}


URI 1007 (Difference)

#include<stdio.h>
int main()
{
int A,B,C,D,PRO;
while(scanf("%d %d %d %d ",&A,&B,&C,&D)==4){
PRO=(A*B-C*D);
printf("DIFERENCA = %d\n",PRO);
}
}
view raw gistfile1.c hosted with ❤ by GitHub


URI 1008

#include <stdio.h>
int main()
{
int num,hour;
float per_hour,salary;
while(scanf("%d %d %f",&num,&hour,&per_hour)==3){
salary=hour*per_hour;
printf("NUMBER = %d\nSALARY = U$ %.2f\n",num,salary);
}
}


URI 1009

#include<stdio.h>
int main()
{
char name[100];
double salary,sold,total,sm,i,j;
while(scanf("%s %lf %lf",name,&salary,&sold)==3){
i=(sold*15)/100;
total=salary+i;
printf("TOTAL = R$ %.2lf\n",total);
}
}


URI 1010

#include<stdio.h>
int main()
{
int id1,id2,s1,s2;
double p1,p2,a,b;
while( scanf("%d %d %lf",&id1,&s1,&p1)==3){
scanf("%d %d %lf",&id2,&s2,&p2);
a=(p1*s1)+(p2*s2);
printf("VALOR A PAGAR: R$ %.2f\n",a);
}
}
view raw gistfile1.c hosted with ❤ by GitHub


URI 1011

#include<stdio.h>
#include<math.h>
int main()
{
int r;
double pi=3.14159,a,b,c;
while( scanf("%d",&r)==1){
a=4/3.0;
b=pow(r,3);
c=a*b*pi;
printf("VOLUME = %.3lf\n",c);
}
}
view raw URI 1011 hosted with ❤ by GitHub


URI 1012

#include<stdio.h>
int main()
{
double a,b,c,pie=3.14159,half=.5,m,n,o,p,q;
while(scanf("%lf %lf %lf",&a,&b,&c)==3){
m=half*(a*c);
n=pie*(c*c);
o=half*(a+b)*c;
p=b*b;
q=a*b;
printf("TRIANGULO: %.3lf\n",m);
printf("CIRCULO: %.3lf\n",n);
printf("TRAPEZIO: %.3lf\n",o);
printf("QUADRADO: %.3lf\n",p);
printf("RETANGULO: %.3lf\n",q);
}
}


URI 1015

#include<stdio.h>
#include<math.h>
int main()
{
int x1,x2,y1,y2;
double a,b;
while(scanf("%d %d",&x1,&y1)==2){
scanf("%d %d",&x2,&y2);
a= pow ((x2-x1),2)+pow ((y2-y1),2);
b=sqrt(a);
printf("%.4lf\n",b);
}
}
view raw URI 15 solution hosted with ❤ by GitHub


URI 1044

#include<stdio.h>
int main()
{
int a,b;
while(scanf("%d %d",&a,&b)==2){
if(b%a==0)
printf("Sao Multiplos\n");
else
printf("Nao sao Multiplos\n");
}
}