fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int N = 3;
  5. int count = 1;
  6.  
  7. while(N!=1){
  8. N *= 3;
  9. N %= 2;
  10. count++;
  11. }
  12.  
  13. printf("%d %d", N, count);
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5512KB
stdin
Standard input is empty
stdout
1 2