mport java.io.*;
class simple_nested_forloop
{
public static void main(String args[])
{
for(int r=1;r<=3;r++)
{
for(int c=1;c<=3;c++)
{
int sum;
sum=r+c;
System.out.println(r+" + "+c+" = "+sum);
}
}
}
}
No comments:
Post a Comment