Search found 2 matches
- Mon Aug 21, 2006 4:01 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10082 - WERTYU
- Replies: 57
- Views: 15443
10082 WA but Why?
I have to poor knowledge to find out the mistake..... plz help me #include<stdio.h> #include<string.h> int main() { char ch; while(ch!=EOF) { ch=getchar(); if(ch=='W') printf("Q"); else if(ch=='E') printf("W"); else if(ch=='R') printf("E"); else if(ch=='T') printf("...
- Mon Aug 21, 2006 3:58 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10327 - Flip Sort
- Replies: 81
- Views: 33430
10327
Plz help me to find the mistake Here is my code #include<stdio.h> int main() { long int n,i,j,temp,a[100000],k,count=0,p; while(scanf("%ld",&n)==1) { for(i=0;i<n;i++) scanf("%ld",&a ); for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) { if(a >a[j]) { temp=a ; a =a[j]; a[j]=temp; coun...