Site hosted by Angelfire.com: Build your free website today!

Mult of Seven

If you wish to view the code only, check this page. You can click the links and it should open up in a notepad file.

 

class MultofSeven{
public static void main(String args[]){
int n;

for(n=1;n<=100;n++)
{
if(n%7==0)System.out.print(" "+n);
else System.out.print(" n");
}
}
}

 

 

New Terms!

n%7: This statement makes the computer check if there is a remainder when n is divided by 7.