So, my #1 problem was this and I works.
1. Write a program to read 5 integer numbers. If the number is between 1 and 500, calculate the square of that number and the cube of it. If its not between 1-500 , just don't do it.
Code
int iCinqNbr, iNbr, iCube, iCarre;
DecimalFormat df = new DecimalFormat("0.00");
for ( iCinqNbr = 0; iCinqNbr < 5; iCinqNbr++) {
iNbr=Integer.parseInt(JOptionPane.showInputDialog("Entrer une première valeur!"));
if (( iNbr >= 1) && ( iNbr <= 500 )){
iCarre=iNbr*iNbr;
iCube=iNbr*iNbr*iNbr;
System.out.println("Le carré de "+iNbr+" est de "+iCarre+" et son cube est de "+iCube+".");}
else
System.out.println("Le nombre restera le même.");
This works ..... now with my #2 , that's where I need help ..
I need to take this code, and make it so it doesn't calculate the square and cube if it's a multiple of 10.
Do I need to do another FOR or IF inside, im lost ..