PHP outputs a code example of a multiplication table
This article mainly introduces the code example for PHP output of the 9-9 multiplication table. This article provides the implementation code directly. For more information, see
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2
// The jlabel is used to display the 9-9 multiplication table, and the jlabel is used to load the background image. The window size is fixed. Public Myframe Extends Jframe{ Public Myframe (){String STR = "";Jlabel JL;Setlayout ( Null );Jl = New Jlabel ();Jl. settext ("9-9 multiplication table ");Add (jl );Jl. setbo
Python 9*9 multiplication table method
This example describes how to output a 9*9 multiplication table in Python. Share it with you for your reference. The specific implementation method is as follows:
?
1 2 3 4 5 6
#! /Usr/bin/env python #9*9 For I in range (1, 10 ): Print For j in range (1, I + 1
For loop continuous summation, 9-9 multiplication table code. A typical example of a for loop is continuous summation: 1 + 2 + 3 + ...... + 100. after talking for more than an hour, some students still don't. Some people have to think about the program. some people keep typing on the keyboard, and the classic example of for loop is continuous summation: 1 + 2 + 3 + ...... + 100. after talking for more than
This is a creation in
Article, where the information may have evolved or changed.
The go language is the second open source programming language released by Google 2009. (Have a good father)
The go language is optimized for programming multi-processor system applications, with go-compiled programs that are comparable to C or C + + code, and are more secure and support parallel processes
Recently to learn Go.python today to learn the go language, want to move hands, do not know what to write good
Topic links
Test instructionsN*m a multiplication table, from small to large sorted, output K number (1?≤? ) N,? M.≤?5 105; 1?≤? K? ≤? N· m)
Analysis:For the number before K, the number after ranking is less than k;k is greater than, then can take two points.
LL N, M, K; LL Fun (ll goal) { ll t = 0, ret = 0; while (++t Codeforces Round #256 (Div. 2)--
99 Multiplication Table
//99乘法表的程序
int[] num = new int[10];
for (int i = 0; i 10; i++)
{
num[i] = i;
}
Console.ForegroundColor = ConsoleColor.Red;
for (int i = 0; i 10; i++)
{
for (int j = 0; j i; j++)
{
console write ( "{0}x{1}={2}" Num [ i ], num [
We are familiar with the multiplication table, can be used in a simple C language to show Oh!#include This article is from the "Na-dimensional Snow" blog, please be sure to keep this source http://1536262434.blog.51cto.com/10731069/1697270C language Output 99 multiplication table
We are familiar with the multiplication table, can be used in a simple C language to show Oh!#include This article is from the "Na-dimensional Snow" blog, please be sure to keep this source http://1536262434.blog.51cto.com/10731069/1697282C Language 99 multiplication table
One, print 99 multiplication table:#coding: Utf-8for i in range (1,10): for J in Range (1,i+1): Print ("%dx%d=%d")% (j,i,j*i), print ' \ n 'Results:650) this.width=650; "title=" 99.png "alt=" wkiom1llma-trl7_aaassxicmss619.png-wh_50 "src=" https://s1.51cto.com/ Wyfs02/m02/99/bb/wkiom1llma-trl7_aaassxicmss619.png-wh_500x0-wm_3-wmp_4-s_2116397384.png "/>Second, print the squareEntity Square Code:#coding: Utf-
RMQ problem: Given an interval of length n, M asks for the maximum/minimum value of each interval element of Li to Ri.RMQ's high-level writing generally has two kinds, namely the line segment tree and the St table.This article mainly explains the St table's writing. (Take the interval maximum as an example)St table: A multiplication algorithm using DP to solve interval maximum value.Definition: F[i][j] repr
Copy Code code as follows:
@echo off
:: 99 Multiplication table
Set num=0
FOR/L%%i in (1,1,9) do (
FOR/L%%j in (1,1,%%i) do call:multiply%%i
)
Pause>nul
Goto:eof
: Multiply
set/a num+=1
set/a var=%1*%2
Set var=%2x%1=%var%
Set var=%var%
If%2 equ 1 (set var=%var:~0,5%) Else set var=%var:~0,6%
Set str=%str%%var%
If%num% equ%1 echo%str%set str=set num=0
Goto:eof
:: Another, with the TA
Note: Daniel Bypass, write the people do not spit AH ~99 multiplication Table Presumably everyone is aware of, then how to apply PHP code to achieve such a multiplication table?Implementation effect:
The following is the implementation of the Code, please new people consciously, understand the brain first, the way t
Print 99 multiplication tableFor Loop statement implementation:1 forIinchRange (1,10):2 forJinchRange (1,10):3 Print(J,"x"I"=", I*j,"\ t", end="")#end= "" is not wrapped because of print wrap line4 ifi==J:5 Print("")#here is the end of line wrapping6 BreakWhile loop statement implementation:1I=02j=03 whileI :4I+=15 whileJ :6J + = 17 Print(J,"x"I"=", I * j,"\ t", end="")8 ifi==J:9
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.