package com.js.ai.modules.pointwall.interfac;

import java.awt.Font;

import javax.print.attribute.standard.MediaName;

import org.apache.poi.ss.usermodel.Color;

public class TestXinXing {

	/*public static void main(String argv[]){
//实现1个心型
for(float y = (float) 1.5;y>-1.5;y -=0.1)
{
for(float x= (float) -1.5;x<1.5;x+= 0.05)
{
float a = x*x+y*y-1;
if((a*a*a-x*x*y*y*y)<=0.0)
{ System.out.print("*"); }
else
System.out.print(" ");
}
System.out.print("\n");
}
} */
/* public static void main(String argv[]){
//实现2个心型,实现n个心型
for(float y = (float) 1.5;y>-1.5;y -=0.1)
{
for(float x= (float) -1.5;x<1.5;x+= 0.05)
{
float a = x*x+y*y-1;
if((a*a*a-x*x*y*y*y)<=0.0)
{
if(Math.abs(x+0.100000712)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("F");
continue;
}
if(Math.abs(x+0.050000306)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("r");
continue;
}
if(Math.abs(x+-3.0621885E-7)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("a");
continue;
}
if(Math.abs(x-0.049999695)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("n");
continue;
}
if(Math.abs(x-0.100000001)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("I L Y");
continue;
} System.out.print("*"); }
else
System.out.print(" ");
} for(float x= (float) 1.5;x<4.5;x+= 0.05)
{
float a = (x-3)*(x-3)+y*y-1;
boolean flag = false;
if((a*a*a-(x-3)*(x-3)*y*y*y)<=0.0)
{
if(Math.abs(x-3+0.100000712)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("C");
flag = true;
continue;
}
if((Math.abs(x-2.9499986)) <= 1e-6 && Math.abs(y-0.6999998)<=1e-6 )
{
System.out.print("a");
continue;
}
if(Math.abs(x-2.9999986)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("s");
continue;
}
if(Math.abs(x-3.0499985)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("i");
continue;
}
if(Math.abs(x-3.0999985)<=1e-6 && Math.abs(y-0.6999998)<=1e-6)
{
System.out.print("o");
continue;
} System.out.print("*"); }
else
System.out.print(" ");
} System.out.print("\n");
}
}*/
public static void main(String[] args) {
//99乘法表
//外层循环控制行数,9行。
//内存循环控制列数、数量。
for(int i=1;i<=9;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(i+"*"+j +"=" +(i*j) +"\t");
}
//换行显示
System.out.println();
}
}
}

  

java实现心型、99乘法demo的更多相关文章

  1. java 打印出99乘法口诀表

    public class Mutiplay { /** *实现99乘法表 * @param args */ public static void main(String[] args) { Syste ...

  2. java使用普通算法实现99乘法表,使用递归实现99乘法表

    public class recursionTest { public static void main(String[] args) { //jiujiu(); m(9); } /* * for循环 ...

  3. JAVA基础编程之打印99乘法表

    需求:打印9*9乘法表 技术考核: 1.for嵌套循环 代码: // 打印99乘法表 public static void print99Table() { System.out.println(&q ...

  4. Java流程控制:增强for循环,break&continue,打印99乘法表

    增强for循环:java5引入了一种主要用于数组或集合的增强for循环for(声明语句:表达式){//代码句子} 声明语句:声明新的局部变量,该变量的类型必须和数组元素的类型匹配.其作用域限定在循环语 ...

  5. 99乘法表 java for循环

    public static void main(String[] args) { //0-100的奇数和偶数和 int jsum=0; int osum=0; for (int i = 0; i &l ...

  6. Android特效专辑(八)——实现心型起泡飞舞的特效,让你的APP瞬间暖心

    Android特效专辑(八)--实现心型起泡飞舞的特效,让你的APP瞬间暖心 马上也要放年假了,家里估计会没网,更完这篇的话,可能要到年后了,不过在此期间会把更新内容都保存在本地,这样有网就可以发表了 ...

  7. JavaScript——99乘法表

    <!DOCTYPE html> <html> <head> <title>99乘法表</title> <style type=&quo ...

  8. js实现99乘法表

    实现99乘法表(输出到页面上) * document.write("<table border='1' bordercolor='blue'>"); //循环行 9 f ...

  9. python打怪之路【第一篇】:99乘法表

    需求:实现99乘法表 代码: #!/usr/bin/env python # -*- coding:utf-8 -*- #author chenjing for i in range(10): for ...

随机推荐

  1. 神经病院Objective-C Runtime入院第一天——isa和Class

    前言 我第一次开始重视Objective-C Runtime是从2014年11月1日,@唐巧老师在微博上发的一条微博开始.   这是sunnyxx在线下的一次分享会.会上还给了4道题目.   这4道题 ...

  2. matlab下kmeans及pam算法对球型数据分类练习

    clear all; clc; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %数据初始化 D ...

  3. MAC OS环境下搭建基于Python语言的Selenium2自动化测试环境

    #1安装Python Mac OS上自带python2.7,在此介绍安装python3.x版本 去官网下载Python for MAC版本 https://www.python.org 安装文件为pk ...

  4. 将 async/await 异步代码转换为安全的不会死锁的同步代码

    在 async/await 异步模型(即 TAP Task-based Asynchronous Pattern)出现以前,有大量的同步代码存在于代码库中,以至于这些代码全部迁移到 async/awa ...

  5. 《DSP using MATLAB》示例Example 8.11

    %% ------------------------------------------------------------------------ %% Output Info about thi ...

  6. 《DSP using MATLAB》示例Example6.2

    2017年了,阳历新年都11号了,已从外地回到家乡,依然苦逼的生活…… 接着写读书(Digital Signal Processing using MATLAB)笔记吧 代码: b = [1 -3 1 ...

  7. 《selenium2 python 自动化测试实战》(20)——Selenium工具介绍

    (一)Selenium IDE Firefox的一个插件,有助于我们理解测试框架.在附加组件里搜索下载,一般搜的结果里前几个都不是,得点那个查看更多才行,找到这个: 安装以后浏览器工具栏会有: 安装好 ...

  8. MAC OS、Windows 、HTML,CSS,font-family:中文字体的英文名称

    宋体 SimSun 黑体 SimHei 微软雅黑 Microsoft YaHei 微软正黑体 Microsoft JhengHei 新宋体 NSimSun 新细明体 PMingLiU 细明体 Ming ...

  9. 实用且堪称神器的Chrome插件推荐

    前言 相信很多人都在使用 Chrome 浏览器,其流畅的浏览体验得到了不少用户的偏爱,但流畅只是一方面, Chrome 最大的优势还是其支持众多强大好用的扩展程序(Extensions).最近为了更好 ...

  10. 去掉UIWebView上下滚动出边界时的黑色阴影

    for (UIView *viewin [_webViewsubviews]){ if ([viewisKindOfClass:[UIScrollView class]]){ for (UIView ...