1 / 80

public class One { public static void main(String[] args) { int size = 10, nuf, fun;

public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if ( fun == 0 || fun == size - 1 || __________________ )

drew
Télécharger la présentation

public class One { public static void main(String[] args) { int size = 10, nuf, fun;

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if ( fun == 0 || fun == size - 1 || __________________ ) System.out.print(" *"); else System.out.print(" "); System.out.println(); } } }

  2. public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if (true) System.out.print( "(" + nuf + "," + fun + ")" ); else System.out.print(" "); System.out.println(); } } }

  3. (0,0)(0,1)(0,2)(0,3)(0,4)(0,5)(0,6)(0,7)(0,8)(0,9) (1,0)(1,1)(1,2)(1,3)(1,4)(1,5)(1,6)(1,7)(1,8)(1,9) (2,0)(2,1)(2,2)(2,3)(2,4)(2,5)(2,6)(2,7)(2,8)(2,9) (3,0)(3,1)(3,2)(3,3)(3,4)(3,5)(3,6)(3,7)(3,8)(3,9) (4,0)(4,1)(4,2)(4,3)(4,4)(4,5)(4,6)(4,7)(4,8)(4,9) (5,0)(5,1)(5,2)(5,3)(5,4)(5,5)(5,6)(5,7)(5,8)(5,9) (6,0)(6,1)(6,2)(6,3)(6,4)(6,5)(6,6)(6,7)(6,8)(6,9) (7,0)(7,1)(7,2)(7,3)(7,4)(7,5)(7,6)(7,7)(7,8)(7,9) (8,0)(8,1)(8,2)(8,3)(8,4)(8,5)(8,6)(8,7)(8,8)(8,9) (9,0)(9,1)(9,2)(9,3)(9,4)(9,5)(9,6)(9,7)(9,8)(9,9)

  4. public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if (_____________) System.out.print( "(" + nuf + "," + fun + ")" ); else System.out.print(" "); System.out.println(); } } } (0,0)(0,1)(0,2)(0,3)(0,4)(0,5)(0,6)(0,7)(0,8)(0,9) (1,0)(1,1)(1,2)(1,3)(1,4)(1,5)(1,6)(1,7)(1,8)(1,9) (2,0)(2,1)(2,2)(2,3)(2,4)(2,5)(2,6)(2,7)(2,8)(2,9) (3,0)(3,1)(3,2)(3,3)(3,4)(3,5)(3,6)(3,7)(3,8)(3,9) (4,0)(4,1)(4,2)(4,3)(4,4)(4,5)(4,6)(4,7)(4,8)(4,9) (5,0)(5,1)(5,2)(5,3)(5,4)(5,5)(5,6)(5,7)(5,8)(5,9) (6,0)(6,1)(6,2)(6,3)(6,4)(6,5)(6,6)(6,7)(6,8)(6,9) (7,0)(7,1)(7,2)(7,3)(7,4)(7,5)(7,6)(7,7)(7,8)(7,9) (8,0)(8,1)(8,2)(8,3)(8,4)(8,5)(8,6)(8,7)(8,8)(8,9) (9,0)(9,1)(9,2)(9,3)(9,4)(9,5)(9,6)(9,7)(9,8)(9,9)

  5. public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if ( fun == 0 ) System.out.print( "(" + nuf + "," + fun + ")" ); else System.out.print(" "); System.out.println(); } } } *** (0,1)(0,2)(0,3)(0,4)(0,5)(0,6)(0,7)(0,8)(0,9) *** (1,1)(1,2)(1,3)(1,4)(1,5)(1,6)(1,7)(1,8)(1,9) *** (2,1)(2,2)(2,3)(2,4)(2,5)(2,6)(2,7)(2,8)(2,9) *** (3,1)(3,2)(3,3)(3,4)(3,5)(3,6)(3,7)(3,8)(3,9) *** (4,1)(4,2)(4,3)(4,4)(4,5)(4,6)(4,7)(4,8)(4,9) *** (5,1)(5,2)(5,3)(5,4)(5,5)(5,6)(5,7)(5,8)(5,9) *** (6,1)(6,2)(6,3)(6,4)(6,5)(6,6)(6,7)(6,8)(6,9) *** (7,1)(7,2)(7,3)(7,4)(7,5)(7,6)(7,7)(7,8)(7,9) *** (8,1)(8,2)(8,3)(8,4)(8,5)(8,6)(8,7)(8,8)(8,9) *** (9,1)(9,2)(9,3)(9,4)(9,5)(9,6)(9,7)(9,8)(9,9)

  6. public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if (fun == nuf) System.out.print( "(" + nuf + "," + fun + ")" ); else System.out.print("(...)"); System.out.println(); } } }

  7. (0,0)(...)(...)(...)(...)(...)(...)(...)(...)(...) (...)(1,1)(...)(...)(...)(...)(...)(...)(...)(...) (...)(...)(2,2)(...)(...)(...)(...)(...)(...)(...) (...)(...)(...)(3,3)(...)(...)(...)(...)(...)(...) (...)(...)(...)(...)(4,4)(...)(...)(...)(...)(...) (...)(...)(...)(...)(...)(5,5)(...)(...)(...)(...) (...)(...)(...)(...)(...)(...)(6,6)(...)(...)(...) (...)(...)(...)(...)(...)(...)(...)(7,7)(...)(...) (...)(...)(...)(...)(...)(...)(...)(...)(8,8)(...) (...)(...)(...)(...)(...)(...)(...)(...)(...)(9,9)

  8. public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if (_____________) System.out.print( "(" + nuf + "," + fun + ")" ); else System.out.print(" "); System.out.println(); } } } (0,0)(0,1)(0,2)(0,3)(0,4)(0,5)(0,6)(0,7)(0,8)(0,9) (1,0)(1,1)(1,2)(1,3)(1,4)(1,5)(1,6)(1,7)(1,8)(1,9) (2,0)(2,1)(2,2)(2,3)(2,4)(2,5)(2,6)(2,7)(2,8)(2,9) (3,0)(3,1)(3,2)(3,3)(3,4)(3,5)(3,6)(3,7)(3,8)(3,9) (4,0)(4,1)(4,2)(4,3)(4,4)(4,5)(4,6)(4,7)(4,8)(4,9) (5,0)(5,1)(5,2)(5,3)(5,4)(5,5)(5,6)(5,7)(5,8)(5,9) (6,0)(6,1)(6,2)(6,3)(6,4)(6,5)(6,6)(6,7)(6,8)(6,9) (7,0)(7,1)(7,2)(7,3)(7,4)(7,5)(7,6)(7,7)(7,8)(7,9) (8,0)(8,1)(8,2)(8,3)(8,4)(8,5)(8,6)(8,7)(8,8)(8,9) (9,0)(9,1)(9,2)(9,3)(9,4)(9,5)(9,6)(9,7)(9,8)(9,9)

  9. frilled.cs.indiana.edu%java One (0,0)(...)(...)(...)(0,4)(...)(...)(...)(...)(...) (...)(1,1)(...)(...)(1,4)(...)(...)(...)(...)(...) (...)(...)(2,2)(...)(2,4)(...)(...)(...)(...)(...) (...)(...)(...)(3,3)(3,4)(...)(...)(...)(...)(...) (...)(...)(...)(...)(4,4)(...)(...)(...)(...)(...) (...)(...)(...)(...)(5,4)(5,5)(...)(...)(...)(...) (...)(...)(...)(...)(6,4)(...)(6,6)(...)(...)(...) (...)(...)(...)(...)(7,4)(...)(...)(7,7)(...)(...) (...)(...)(...)(...)(8,4)(...)(...)(...)(8,8)(...) (...)(...)(...)(...)(9,4)(...)(...)(...)(...)(9,9) frilled.cs.indiana.edu%cat One.java public class One { public static void main(String[] args) { int size = 10, nuf, fun; for (nuf = 0; nuf < size; nuf++) { for (fun = 0; fun < size; fun++) if (nuf == fun || fun == 4) System.out.print( "(" + nuf + "," + fun + ")" ); else System.out.print("(...)"); System.out.println(); } } }

  10. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( p && ( q || !r ))); } }

  11. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false && ( q || !r ))); } }

  12. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false && ( true || !r ))); } }

  13. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false && ( true || !true ))); } }

  14. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false && ( true || false ))); } }

  15. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false && ( true ))); } }

  16. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false && true )); } }

  17. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! ( false )); } }

  18. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( ! false ); } }

  19. class One { public static void main(String[] args) { boolean p = false, q = true, r = true; System.out.println( true ); } }

  20. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; }

  21. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; }

  22. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; }

  23. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; }

  24. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; } so y ends up being 1

  25. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; }

  26. int x = 8, y = 0; { if (x < 10) if (x > 5) y = 1; } else y = 2;

  27. int x = 8, y = 0; if (x < 10) { if (x > 5) y = 1; else y = 2; }

  28. int x = 8, y = 0; { if (x < 10) if (x > 5) y = 1; } else y = 2;

  29. int x = 8, y = 0; { if (x < 10) if (x > 5) y = 1; }else y = 2;

  30. for (int i = -10; i <= 10; i = i + 3) System.out.print("?");

  31. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10

  32. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 ?

  33. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 ?

  34. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 ??

  35. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 -4 ??

  36. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 -4 ???

  37. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 -4 -1 ???

  38. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 -4 -1 2 5 8 11 ???????

  39. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 -4 -1 2 5 8 11 ???????

  40. for (int i = -10; i <= 10; i = i + 3) System.out.print("?"); i -10 -7 -4 -1 2 5 8 11 done ???????

  41. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(kanga(ru(1, 2), 1), 2), ru(1, 2) ), 1 ) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  42. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(kanga(ru(1, 2), 1), 2), ru(1, 2)), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  43. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(kanga(ru(1, 2), 1), 2), -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  44. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(kanga(ru(1, 2), 1), 2), -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  45. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(kanga(-1, 1), 2), -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  46. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(kanga(-1, 1), 2), -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  47. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(0, 2), -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  48. class One { public static void main(String[] args) { System.out.println( kanga(kanga(kanga(0, 2), -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  49. class One { public static void main(String[] args) { System.out.println( kanga(kanga(2, -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

  50. class One { public static void main(String[] args) { System.out.println( kanga(kanga(2, -1 ), 1) ); } public static int kanga(int a, int b) { return a + b; } public static int ru(int a, int b) { return a - b; } }

More Related