62,614
社区成员
发帖
与我相关
我的任务
分享
import java.util.*;
public class cyff
{
public static void main (String args [])
{
Scanner cfbn=new Scanner(System.in);
Mul mul1=new Mul();
int n=cfbn.nextInt();
System.out.println(mul1.cfb(n));
}
class Mul
{
public void cfb(int x)
{
for (int h;h<=x;h++)
{
for (int l;l<=h;l++)
{
int result=h*l;
System.out.print(h+"×"+l+"="+result);
System.out.print(" ");
}
System.out.println();
}
}
}
}
import java.util.*;
public class cyff
{
public static void main (String args [])
{
Mul mul1=new Mul();
mul1.cfb();
}
}
class Mul
{
public void cfb()
{
Scanner cfbn=new Scanner(System.in);
int x=cfbn.nextInt();
for (int h=1;h<=x;h++)
{
for (int l=1;l<=h;l++)
{
int result=h*l;
System.out.print(h+"×"+l+"="+result);
System.out.print(" ");
}
System.out.println();
}
}
}