Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. import java.util.*;
  2. public class Solution {
  3.  
  4. public static void main(String[] args) {
  5.  
  6. Scanner sc = new Scanner(System.in);
  7.  
  8. //store multiple numbers
  9. //using the same storage
  10.  
  11. //type[] name = new type[size];
  12. int[] C = new int[3];
  13.  
  14.  
  15. //Array
  16. //index position, index position start from 0
  17. C[0] = sc.nextInt();
  18. C[1] = sc.nextInt();
  19. C[2] = sc.nextInt();
  20.  
  21. System.out.println(C[0]);
  22. System.out.println(C[1]);
  23. System.out.println(C[2]);
  24.  
  25.  
  26. //Create array D store 4 String
  27.  
  28. //Apple Banana Carrot DragonFruit
  29.  
  30. String[] D = new String[4];
  31. D[0] = "Apple";
  32. D[1] = "Banana";
  33. D[2] = "Carrot";
  34. D[3] = "DragonFruit";
  35.  
  36.  
  37. String[] E = {"Apple","Banana","Carrot","DragonFruit"};
  38.  
  39.  
  40. // Create array F to store 5 numbers
  41. // input 5 numbers to store into Array F
  42.  
  43. int[] F = new int[5];
  44. for (int i=0; i<5; i++) {
  45. F[i] = sc.nextInt();
  46. }
  47.  
  48. //isabella
  49.  
  50. int[] W = new int [5]
  51. for(int pppp=0;pppp<5;pppp++){
  52. W[pppp]=sc.nextInt();
  53. }
  54.  
  55. //Ryan
  56. int[] X = new int [5];
  57. Scanner input = new Scanner(System.in);
  58. for (int x = 0; x<5; x++) {
  59. X[x] = sc.nextInt();
  60. }
  61.  
  62. //dennis
  63. int[] F = new int [5];
  64. Scanner sc = new Scanner(System.in);
  65. for (int f = 0; f < 5; f++){
  66. F[f] = sc.nextInt;
  67. }
  68. //Ian
  69. int[] I = new int [5];
  70. Scanner sc = new Scanner(System.in);
  71. for (int i =0; i<5; i++){
  72. I[i] = sc.nextInt();
  73. }
  74. //zack
  75. int [] zack = new int [5];
  76. Scanner input=new Scanner(System.in);
  77. for (int i=0;i<5;i++)
  78. {
  79. zack[i] = input.nextInt();
  80. }
  81.  
  82. //alex
  83. Scanner scan = new Scanner(System.in);
  84. int[] F = new int [5];
  85. for (int a =0; a<5; a++) {
  86. F[a] = sc.nextInt();
  87. }
  88.  
  89.  
  90. //David
  91. int[] C = new int[5];
  92. for (int c=0; c<5; c++){
  93. C[c] = input.nextInt();
  94. }
  95.  
  96.  
  97. //Duowen
  98. Scanner sc = new Scanner(System.in);
  99. int [] F = new in [5];
  100.  
  101. for (int a = 0; a < 5; a++){
  102. F[a] = sc.nextInt();
  103. }
  104. //daniel
  105.  
  106. Scanner sc = new Scanner(System.in);
  107. int [] F = new int [5];
  108. for(int D = 0; D < 5;D++){
  109. F[D] = sc.nextInt();
  110. }
  111.  
  112. //Sean
  113. Scanner get = new Scanner(System.in);
  114.  
  115. int[] F = new int[5];
  116.  
  117. for(int i = 0; i < 5; i++){
  118. F[i] = get.nextInt();
  119. }
  120.  
  121.  
  122. //Allan
  123. Scanner sc new Scanner(System.in);
  124. int [] F = new int [5];
  125. for(int x =0; x < 5; x++){
  126. F[x] = sc.nextInt();
  127. }
  128.  
  129.  
  130.  
  131.  
  132. }
  133.  
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement