Problem 2148 Moon Game Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description Fat brother and Maze are playing a kind of special (hentai) game in the clearly blue sky which we can just consider as a kind of two-dimensional plane. Then Fat
扩展一个已有的类,并且继承该类的属性和行为这种方式成为继承. 实例 public class Polygon { public int sides; public double area; public int getNumberOfSides() { System.out.println(sides); return sides; } /**重写toString*/ @Override public String toString() { return "边数为:" + this.s
#define _CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>#include<time.h> int main(){ int n; printf("请输入想要打印三角形的高度:\n"); scanf("%d", &n); for (int i = 0; i &l
J - Sincerely Gym - 101350J Physics cat likes to draw shapes and figure out their area. He starts by drawing a circle. Then inside the circle, he draws the triangle X, Y, Z - where Y is the center point of the circle, and X and Z touch the circumfere
原理: 要判断输入的三条边能否够成三角形,只需满足条件两边之和大于第三边即可. #include<stdio.h> int main() { printf("请输入三个边长:\n"); float a, b, c;//定义变量 scanf_s("%f%f%f", &a, &b, &c);//输入边长 if(a + b > c&& a + c > b&& b + c > a)//判断