JAVA乘法表怎么写?
1*1=11*2=22*2=41*3=32*3=63*3=91*4=42*4=83*4=124*4=16....................................
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
1*4=4 2*4=8 3*4=12 4*4=16
.........................
.....................依此类推
第一行1×1=1靠右边依此下推,就是上面那种水平翻转 展开
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
1*4=4 2*4=8 3*4=12 4*4=16
.........................
.....................依此类推
第一行1×1=1靠右边依此下推,就是上面那种水平翻转 展开
展开全部
public class Multiplicaiton
{
public static void main(String[] args)
{
for (int i = 1; i <= 9; i++)
{
for(int n = 1; n <= i; n++)
{
System.out.print( i + " x " + n + " = " + i * n + " ");
}
System.out.println();
}
}
}
{
public static void main(String[] args)
{
for (int i = 1; i <= 9; i++)
{
for(int n = 1; n <= i; n++)
{
System.out.print( i + " x " + n + " = " + i * n + " ");
}
System.out.println();
}
}
}
2006-03-13
展开全部
/**
* Author: Liu Weijun
* Date: 2005.11.23
* Description: page for a travel
*
*/
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class BruceTravelRequest extends HttpServlet {
public void doPost(
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
/**
* Indicate the content type (for example, text/html),
* being returned by the response 20
*/
response.setContentType("text/html");
/**
* Retrieve an output stream to use to send data to the client
*/
PrintWriter out = response.getWriter();
/**
* Get the user input from the form : name and destination
*/
/* Add your code here */
String useName = request.getParameter("Name");
String useDestination = request.getParameter("Destination");
/** 41
* Start by building the web page header
*/
/* Add your code here */
out.println(
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>");
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>iCarnegie Travel Agency</TITLE>");
out.println("</HEAD>");
out.println("<BODY bgcolor='oliver'>");
/**
* Add the image
*/
/* Add your code here */
out.println("<IMG src='/" + useDestination
+ "' alt='" + useDestination + "'>");
/**
* Add the confirmation message, with the name
*/
/* Add your code here */
out.println("<br><font size=6 color=red><B>Hello, "+useName+"!<br></b></font>");
out.println(
"<font size=6 color=red><B>Thanks for your request. <br> You will be contacted shortly.</b></font>");
/**
* End by building the web page footer
*/
/* Add your code here */
out.println("</BODY>");
out.println("</HTML>");
} // end-doPost
}
* Author: Liu Weijun
* Date: 2005.11.23
* Description: page for a travel
*
*/
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class BruceTravelRequest extends HttpServlet {
public void doPost(
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
/**
* Indicate the content type (for example, text/html),
* being returned by the response 20
*/
response.setContentType("text/html");
/**
* Retrieve an output stream to use to send data to the client
*/
PrintWriter out = response.getWriter();
/**
* Get the user input from the form : name and destination
*/
/* Add your code here */
String useName = request.getParameter("Name");
String useDestination = request.getParameter("Destination");
/** 41
* Start by building the web page header
*/
/* Add your code here */
out.println(
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>");
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>iCarnegie Travel Agency</TITLE>");
out.println("</HEAD>");
out.println("<BODY bgcolor='oliver'>");
/**
* Add the image
*/
/* Add your code here */
out.println("<IMG src='/" + useDestination
+ "' alt='" + useDestination + "'>");
/**
* Add the confirmation message, with the name
*/
/* Add your code here */
out.println("<br><font size=6 color=red><B>Hello, "+useName+"!<br></b></font>");
out.println(
"<font size=6 color=red><B>Thanks for your request. <br> You will be contacted shortly.</b></font>");
/**
* End by building the web page footer
*/
/* Add your code here */
out.println("</BODY>");
out.println("</HTML>");
} // end-doPost
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
for(int i=1;i<=9;i++){
for(ing j=1;j<=i;j++)
System.out.print(i+"*"+j+"="+i*j+"\t");
System.out.println();//换行
}
for(ing j=1;j<=i;j++)
System.out.print(i+"*"+j+"="+i*j+"\t");
System.out.println();//换行
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
public
class
Multiplicaiton
{
public
static
void
main(String[]
args)
{
for
(int
i
=
1;
i
<=
9;
i++)
{
for(int
n
=
1;
n
<=
i;
n++)
{
System.out.print(
i
+
"
x
"
+
n
+
"
=
"
+
i
*
n
+
"
");
}
System.out.println();
}
}
}
class
Multiplicaiton
{
public
static
void
main(String[]
args)
{
for
(int
i
=
1;
i
<=
9;
i++)
{
for(int
n
=
1;
n
<=
i;
n++)
{
System.out.print(
i
+
"
x
"
+
n
+
"
=
"
+
i
*
n
+
"
");
}
System.out.println();
}
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我问谁
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
更多回答(4)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询