/**
* 【程序6】
* 题目:用星号输出字母C的图案。
* 程序分析:可先用'*'号在纸上写出字母C,再分行输出。
*/
#include<stdio.h>
int main() {
printf(" ****\n");
printf(" *\n");
printf(" *\n");
......................
阅读全部
|
dzyyyy
贴于 2022年8月7日 18:04
hide
bbsi
#include <stdio.h>
#include <iostream>
#include <math.h>
float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}
float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
return y;
......................
阅读全部
|
ゐ丶僷ヂ諾
贴于 2022年8月7日 11:21
hide
bbsi
/**
* 【程序7】
* 题目:在屏幕上用星号画一个空心的圆。
*/
#include <stdio.h>
#include <math.h>
int main() {
double y;
int x, m;
for (y = 10; y >= -10; y--) { // 圆的半径为10
......................
阅读全部
|
hx87
贴于 2022年8月2日 11:35
hide
bbsi
#include<iostream>
#include<ctime>
#include<stdlib.h>
using namespace std;
int main()
{
srand(time(0));
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
return 0;
......................
阅读全部
|
wl0421
贴于 2022年7月31日 19:23
hide
bbsi
/**
* 【程序5】
* 题目:三色球问题。若一个口袋中放有12个球,其中有3个红的。3个白的和6个黒的,问从中任取8个共有多少种不同的颜色搭配?
*/
#include<stdio.h>
int main() {
int i, j, count = 0;
printf(" RED BALL WHITE BALL BLACKBALL\n");
printf("..................................................\n");
......................
阅读全部
|
dzyyyy
贴于 2022年7月31日 09:02
hide
bbsi
import asyncio
import time
import random
# ref: https://blog.csdn.net/weixin_44431371/article/details/113696033
async def washing(num):
await asyncio.sleep(num)
print ("I'm washing", num)
start = time.time()
......................
阅读全部
|
jetlee
贴于 2022年7月27日 15:38
hide
bbsi
package main
import "fmt"
import "math/rand"
import "time"
func bubleSort(nums []int) {
for i := len(nums)-1; i >= 0; i-- {
for j := 0; j < i; j++ {
if nums[j] > nums[j+1] {
nums[j], nums[j+1] = nums[j+1], nums[j]
}
......................
阅读全部
|
jetlee
贴于 2022年7月25日 08:48
hide
bbsi
Option Explicit
' By音符,QQ:337855632 Time:2020-03-17 功能定制:20元起
Const C_GameWith = 1024
Const C_GameHeight = 768
Const C_GameSmallWith = 320
Const C_GameSmallHeight = 240
'黑带 16 20
Dim GamehWnd, dm, AppName, config, bgkms, KMData
config = ".\Angel.ini"
AppName = "Angel_BP"
Function CmpMutlColor(Args, Sleep)
Dim i
......................
阅读全部
|
王宇577
贴于 2022年7月25日 02:57
hide
bbsi
/**
* 【程序3】
* 题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
* 程序分析:在10万以内判断,先将该数加上100后再开方,再将该数加上268后再开方,如果开方后的结果满足如下条件,即是结果。
*/
// #include<stdio.h>
// #include<math.h>
// int main() {
// long int i,x,y,z;
// for (i=1;i<100000;i++) {
......................
阅读全部
|
dzyyyy
贴于 2022年7月23日 21:00
hide
bbsi
package main
import "fmt"
import "math/rand"
import "time"
func bubleSort(nums []int) {
for i := len(nums)-1; i >= 0; i-- {
for j := 0; j < i; j++ {
if nums[j] > nums[j+1] {
nums[j], nums[j+1] = nums[j+1], nums[j]
}
......................
阅读全部
|
jetlee
贴于 2022年7月22日 16:56
hide
bbsi