Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. My Drive
  2. Today
  3. 12:03 PM
  4. J
  5. You uploaded an item
  6. Java
  7. Assignment5dot2.java
  8. Last week
  9. Fri 11:25 AM
  10. J
  11. You uploaded 5 items
  12. Java
  13. CollegeStudent.java
  14. Java
  15. Exponent.java
  16. Java
  17. Registrar.java
  18. Java
  19. Lottery.java
  20. Java
  21. CreatePurchase.java
  22. Fri 11:25 AM
  23. J
  24. You created an item in
  25. Google Drive Folder
  26. Bellevue University
  27. Google Drive Folder
  28. Java Code
  29. Last month
  30. Jan 15
  31. J
  32. You edited an item
  33. Word
  34. Group 5 - Resource Allocatoin - Week 7.docx
  35. Jan 14
  36. J
  37. You created and shared an item in
  38. Google Drive Folder
  39. Information Technology Project
  40. Word
  41. Group 5 - Risk Register - Week 9.docx
  42. Can edit
  43. Anyone with the link
  44. Jan 14
  45. J
  46. Youmoved an item to the trash
  47. Word
  48. Group 5 - Risk Register - Week 9.docx
  49. Jan 14
  50. J
  51. You created 2 items in
  52. Google Drive Folder
  53. Information Technology Project
  54. Word
  55. Group 5 - Risk Register - Week 9.docx
  56. Word
  57. Group 5 - Probability/Impact Matrix - Week 9.docx
  58. Jan 10
  59. J
  60. You uploaded an item
  61. PDF
  62. Benchmark Progress Report - Jason Staley_Jan2020.pdf
  63. Jan 9
  64. J
  65. You edited an item
  66. Word
  67. Group 5 - Project Communication Plan - Week 8.docx
  68. Jan 8
  69. J
  70. You created and shared an item in
  71. Google Drive Folder
  72. Information Technology Project
  73. Word
  74. Group 5 - Project Communication Plan - Week 8.docx
  75. Can edit
  76. Anyone with the link
  77. Last year
  78. Dec 20, 2019
  79. J
  80. You edited an item
  81. Word
  82. Group 5 - Resource Allocatoin - Week 7.docx
  83. Dec 19, 2019
  84. J
  85. You created and shared 2 items in
  86. Google Drive Folder
  87. Information Technology Project
  88. Word
  89. Group 5 - Resource Allocatoin - Week 7.docx
  90. Word
  91. Group 5 - Cost Estimate - Week 7.docx
  92. Can edit
  93. Anyone with the link
  94. Dec 19, 2019
  95. J
  96. You edited an item
  97. Word
  98. Group 5 - Cost Estimate - Week 7.docx
  99. Dec 3, 2019
  100. J
  101. Youmoved 4 items to the trash
  102. XML
  103. sms.xsl
  104. XML
  105. calls.xsl
  106. Text
  107. BackupRestoreTest.txt
  108. XML
  109. calls-20191202184506.xml
  110. Dec 2, 2019
  111. J
  112. You uploaded 5 items
  113. XML
  114. sms.xsl
  115. XML
  116. sms-20191202184506.xml
  117. XML
  118. calls.xsl
  119. XML
  120. calls-20191202184506.xml
  121. Text
  122. BackupRestoreTest.txt
  123. Dec 2, 2019
  124. J
  125. You created an item in
  126. My Drive
  127. Google Drive Folder
  128. Text messages
  129. Dec 2, 2019
  130. J
  131. You moved an item to
  132. Google Drive Folder
  133. 2018
  134. PDF
  135. 2018 Supporting Documents for Tax Returns.pdf
  136. Dec 2, 2019
  137. J
  138. You created an item in
  139. My Drive
  140. PDF
  141. 2018 Supporting Documents for Tax Returns.pdf
  142. Dec 2, 2019
  143. J
  144. You moved an item to
  145. Google Drive Folder
  146. 2018
  147. PDF
  148. 2018 Corporate Return.pdf
  149. Dec 2, 2019
  150. J
  151. You created an item in
  152. My Drive
  153. PDF
  154. 2018 Corporate Return.pdf
  155. /*
  156. Jason Staley
  157. 2/24/2020
  158. Assignment 5.2
  159. Simple debug for Week 5
  160. Bellevue University
  161. File Name: Assignment5dot2.java
  162. Number of bugs: 3
  163. */
  164.  
  165. import java.utility.*;
  166.  
  167. public class Assignment5dot2 {
  168. public static void main(String[] args) {
  169.  
  170. //Create Scanner object to get user input
  171. Scanner keyboard = new Scanner(System.in);
  172.  
  173. //Prompt user for total of numbers
  174. System.out.print("\nPlease enter how many generated random numbers (numbers range from 0 to 99) you want to have sorted >> ");
  175. int userNum = keyboard.nextInt();
  176.  
  177. //Create array for random numbers
  178. int[] randomNums = new int[userNum];
  179.  
  180. //Fill array with random numbers
  181. for (int x = 0; x < randomNums.length; ++x)
  182. randomNums[x] = (int)(Math.rand() * 100);
  183.  
  184. //Display numbers
  185. System.out.println("\nRandom numbers generated >> ");
  186. for(int val : randomNums)
  187. System.out.print(val + " ");
  188.  
  189. //Display numbers sorted
  190. System.out.println("\n\nRandom numbers sorted >> ");
  191. Arrays.sort(randomNums);
  192. for(int val : randomNums)
  193. System.out.print(val + " ");
  194.  
  195. //Extra blank line for spacing
  196. System.out.println(");
  197.  
  198. }
  199. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement