Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- P1G
- import java.lang.Math;
- import java.util.*;
- public class P1G{
- public static void main (String [] args){
- int[10] myArray = [];
- for(int index = 0, index <= my.Array.length, index++)
- {
- myArray[index]=Math.random(-100-100);
- }
- int index = 0; int postives;
- while (index<= myArray[index])
- {
- if(myArray[index]>=0)
- System.out.println(myArray[index]);
- index++
- }
- System.outprintln("positives"+" "+positives);
- }
- }
- P1E
- public class P1E{
- public static void main (String [] args){
- String[]favesongs= {"Shut it Down," "Beauty and a Beat, "Begin."};
- String[]favemovies= {"Clueless" "Bring It On: All or Nothing" "Legally Blonde"}
- for(int index= 0; index < myArray.length; index++)
- {
- System.out.println(movies[index]);
- }
- System.out.println();
- System.out.println();
- Int index = 0;
- While(index<myArray.length)
- {
- System.out.print(songs[index]);
- index++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement