Search found 1 match

by andy74139
Sat Jan 10, 2009 3:35 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320329

Re: 100

Does anyone can look at my code and tell me what the problem? I keep getting WA.


#include <stdio.h>

int main() {
int length, i, large, x, min, max, swap;

while(scanf("%d", &min) == 1){
scanf("%d", &max);
large = 2;
if(min>max){
i = min;
min = max;
max = i;
swap = 1;
}else swap = 0 ...

Go to advanced search