Search found 2 matches

by tansif.ruetcse13
Sun Mar 22, 2015 2:22 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 18687

Re: 412 - Pi why wa???

#include<stdio.h> #include<math.h> int main() { int i,j,a[50],d,temp,N,t; while(1) { d=0,t=0; scanf("%d",&N); if(N==0) break; for(i=0;i<N;i++) { scanf("%d",&a[i]); } for(i=0;i<N-1;i++) { for(j=i+1;j<N;j++) { if(a[i]<a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } for(i=0;i<N-1;i++) { for(j=i+1;j<N;j...
by tansif.ruetcse13
Sun Mar 22, 2015 1:58 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 18687

Re: 412 - Pi

#include<stdio.h> #include<math.h> int main() { int i,j,a[50],d,temp,N,t; while(1) { d=0,t=0; scanf("%d",&N); if(N==0) break; for(i=0;i<N;i++) { scanf("%d",&a[i]); } for(i=0;i<N-1;i++) { for(j=i+1;j<N;j++) { if(a[i]<a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } for(i=0;i<N-1;i++) { for(j=i+1;j<N;j...

Go to advanced search