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. Linux内存中Swap机制(转)

    在做监控时,发现内存中有一项Swap space,不是很理解,这里查了一些资料: http://blog.sina.com.cn/s/blog_502d765f0100krph.html 在linux ...

  2. c# 自定义排序类(冒泡、选择、插入、希尔、快速、归并、堆排序等)

    using System; using System.Text; namespace HuaTong.General.Utility { /// <summary> /// 自定义排序类 ...

  3. css hover伪类选择器与JQuery hover()方法

    css hover伪类选择器 它属于anchor伪类 在支持 CSS 的浏览器中,<a>标签链接的不同状态都可以以不同的方式显示,常常用来改链接的颜色效果 实例 a:link {color ...

  4. ImportError: liblapack.so.3: cannot open shared object file问题

    问题: 安装完tensorflow后,在终端输入: python import cv2 出现如下错误: ImportError: liblapack.so.3: cannot open shared ...

  5. 【剑指offer】链表中倒数第k个节点,C++实现(链表)

    1.题目 输入一个链表,输出该链表中倒数第k个结点.链表的尾节点是倒数第一个节点. struct ListNode { int val; struct ListNode *next; } 2.思路   ...

  6. sha1的加密

    from hashlib import sha1 #给password加密s1 = sha1() #创建sha1加密对象s1.update(password.encode("utf-8&qu ...

  7. 关于python机器学习常用算法的例子

    Home Installation Documentation  Examples     Previous An introduction ... This documentation is for ...

  8. div横排放置对齐问题;block,inline,inline-block区别

    1.左右两个div都设置为float:left,如果右边div没有设置宽度,右边div的宽度会根据div里的内容自动调整. 缺点:不易控制 2.只有左侧div设置为float:left,右侧div设置 ...

  9. BZOJ4552 Tjoi2016&Heoi2016排序 【二分+线段树】*

    Description 在2016年,佳媛姐姐喜欢上了数字序列.因而他经常研究关于序列的一些奇奇怪怪的问题,现在他在研究一个难题,需要你来帮助他.这个难题是这样子的:给出一个1到n的全排列,现在对这个 ...

  10. VSCode插件开发

    VSCode插件开发全攻略(十)打包.发布.升级 发布方式 插件开发完了,如何发布出去分享给他人呢?主要有3种方法: 方法一:直接把文件夹发给别人,让别人找到vscode的插件存放目录并放进去,然后重 ...