C#基础-九九乘法表和冒泡排序
//乘法表
for (int i = ; i < ; i++)//行
{
for (int j = ; j < ; j++)//列
{
if (j <= i)
{
Console.Write("{0}*{1}={2}\t", j, i, j * i);//列在前行在后,小的在前大的在后加上制表符
}
}
Console.WriteLine();
}
Console.ReadKey();

#region 复习冒泡排序
int[] arrayint = { , , , , , , , , , , , , , , , , , , , };
for (int i = ; i < arrayint.Length - ; i++)
{
for (int j = ; j < arrayint.Length - - i; j++)
{
if (arrayint[j] < arrayint[j + ])
{
int temp = arrayint[j];
arrayint[j] = arrayint[j + ];
arrayint[j + ] = temp;
}
}
}
foreach (int item in arrayint)
{
Console.WriteLine(item);
}
Console.ReadKey();
#endregion
C#基础-九九乘法表和冒泡排序的更多相关文章
- [作业] Python入门基础---九九乘法表
1.while 循环 : x = 1 while x < 10: y = 1 while y <=x: print('%d*%d=%2d' % (y,x,x*y),end = '\t') ...
- Python3基础 九九乘法表
Python : 3.7.3 OS : Ubuntu 18.04.2 LTS IDE : pycharm-community-2019.1.3 ...
- C#基础第二天-作业答案-九九乘法表-打印星星
题一:九九乘法表的答案 //正三角 ; i < ; i++) { ; j <= i; j++) { Console.Write("{0}*{1}={2} ", j, i ...
- python基础练习题(九九乘法表)
又把python捡起来了,动手能力偏弱,决定每日一练,把基础打好! ------------------------------------------------------------------ ...
- JSP基础语法---九九乘法表-java jsp
<%@ page language="java" import="java.util.*" contentType="text/html; ch ...
- 九九乘法表的实现--JAVA基础
JAVA算法实现:输出九九乘法表 Jiujiu.java: package com.qkys.www; public class Jiujiu { public static void main(St ...
- Java基础编程题——打印九九乘法表
package com.yangzl.basic; /** * 九九乘法表 * @author Administrator * */ public class Nine_Nine_Multiplica ...
- C#基础第二天-作业-九九乘法表-打印星星
一.打印九九乘法表图形为下列效果图中的三角型的一种例: 图一效果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*5=5 ...
- java基础入门之九九乘法表
/* 自学java 九九乘法表 Power by Stuart Date: 2015.4.23 */public class Math { public static void main (Strin ...
随机推荐
- [Educational Round 17][Codeforces 762F. Tree nesting]
题目连接:678F - Lena and Queries 题目大意:给出两个树\(S,T\),问\(S\)中有多少连通子图与\(T\)同构.\(|S|\leq 1000,|T|\leq 12\) 题解 ...
- hive的join
第一:在map端产生join mapJoin的主要意思就是,当链接的两个表是一个比较小的表和一个特别大的表的时候,我们把比较小的table直接放到内存中去,然后再对比较大的表格进行m ...
- spring-security权限管理学习目标
1.SVN基本介绍: 1.svn基本的概念 2.svn架构 3.svn下载与安装 4.svn搭建与基本操作 2.svn基本操作 1.操作1 2.操作2 3.冲突产生 4.冲突解决 3.SVN在IDEA ...
- ubuntu16.04开机时的.local问题
开机时显示:您的当前网络有.local域,我们不建议这样做而且这与AVAHI网络服务探测不兼容,该服务已被禁用 解决方法: 在终端输入:sudo gedit /etc/default/avahi-da ...
- c# 右下角弹出窗口
public partial class Form2 : Form { System.Diagnostics.Stopwatch sth = new System.Diagnostics.Stopwa ...
- RevDebug -- VS 调试神器,你值得拥有!
1. What's RevDebug Don't debug - replay! Trace the root cause of bugs in a matter of seconds, save y ...
- 大数据BI框架知识点备注
将这段时间的一些基于大数据方案的BI知识点暂时做些规整,可能还存在较多问题,后续逐步完善修改. 数据模型: 1.星型模型和雪花模型,同样是将业务表拆分成事实表和纬度表:例如一个员工数据表,可以拆分为员 ...
- [Swift]LeetCode6. Z字形变换 | ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like ...
- [Swift]LeetCode199. 二叉树的右视图 | Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nod ...
- [Swift]LeetCode928. 尽量减少恶意软件的传播 II | Minimize Malware Spread II
(This problem is the same as Minimize Malware Spread, with the differences bolded.) In a network of ...