Search found 2 matches

by mohidul18
Tue Mar 27, 2007 5:51 am
Forum: Volume 101 (10100-10199)
Topic: 10195 - The Knights Of The Round Table
Replies: 59
Views: 15887

10195

#include<stdio.h>
#include<math.h>

void main(){
double a,b,c,r;
while(scanf("%lf %lf %lf",&a,&b,&c)){ r=(a+b+c)/2.0;
if(r)printf("The radius of the round table is: %.3lf\n",sqrt((r-a)*(r-b)*(r-c)/r));
else printf("The radius of the round table is: 0.000\n");}
}
by mohidul18
Tue Mar 27, 2007 5:26 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25029

can any one known me,why 160 problem is CE

#include<stdio.h> int pr[26]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79, 83,89,97,101}; void factor(int c,int a[]) { if(c==1)return ; factor(c-1,a); int i; for( i=0;pr <=c;i++){ while(!(c%pr )){a ++;c=c/pr ;}} } void main() { int n,i ; while(scanf("%d ",&n)&&n) {printf("%3d! = ",...

Go to advanced search