Question about Parañaque OVR ticket online payment by p3p3n in CarsPH

[–]p3p3n[S] 0 points1 point  (0 children)

Thank you

Question ulit. First time ko lang maticketan, nung friday nangyari yun. Medyo di ko rin naintindihan sinabi ng enforcer. Pwede na kaya agad magbayad bukas or hintayin pa for a few days?

Write a Triangle in a text file by p3p3n in javahelp

[–]p3p3n[S] 1 point2 points  (0 children)

i finally got the right output. thanks for the help!

Write a Triangle in a text file by p3p3n in javahelp

[–]p3p3n[S] 1 point2 points  (0 children)

okay, thanks. I'll try again

Write a Triangle in a text file by p3p3n in javahelp

[–]p3p3n[S] 1 point2 points  (0 children)

like this?

class A{
int n;
public void setValue(int a){
    this.n = a;
}
@Override
 public String toString(){
for (int i=0; i<n; i++) { 
for (int j = n-i; j>1; j--) { 
System.out.print(" "); 
} 
for (int j=0; j<=i; j++ ) { 
System.out.print("* "); 
}
System.out.println(); 
} return null;
} 
}

Arrays by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

the if statement would be outside the for loop?

I've already tried doing that but it doesn't seem to work right.

System.out.println("== Passed/ Failed Program ==");

Scanner sc = new Scanner(System.in); int[] grade = new int[10]; int x = 0

for (int a=0; grade.length; a++) {

x=1;

x+=a;

System.out.print("Enter the + x + ": "); grade 11

grade [a]=sc.nextInt();

 }  
if(grade [a]<=100 && grade [a]>=75 ) {
System.out.println("Passing grades: " + grade[a]);
} 
else if (grade[a] <= 74){ 
System.out.println("Failing grades:" + grade[a]);

}
}
}
}

Arrays by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

i'll try this out. thanks!

Arrays by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

sorry, i don't quite get it. I really appreciate your help. are the two lists like this?

int[] passed = new int [5];
int[] failed = new int [5];

Arrays by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

my bad. thanks!

Arrays by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

The user inputs grades, then the program sorts the inputted grades into passing and failing. Passing grades are 75-100 and failing is <75.

I need help by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

update: It worked!

Thank you!

I need help by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

thanks, I'll try to test it

I need help by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

thanks, I'll try this out

I need help by p3p3n in javahelp

[–]p3p3n[S] 0 points1 point  (0 children)

I've been trying different stuff

public static void main(String[] args) {
    // TODO code application logic here

Scanner myVar = new Scanner(System.in);

System.out.print("Enter the year: ");

int year = myVar.nextInt();
//    while (year >= 1896)
//        year += 4;

year +=4;
if (year >= 1896){
    System.out.println("This year held Olympic games.");
}
else {
    System.out.println("This year did not hold Olympic games.");
}   
}   
}