鱼C论坛

 找回密码
 立即注册
123
返回列表 发新帖
楼主: 无符号整形

[日问] #每日一问# 2016-9-21 (答题领鱼币)

[复制链接]
发表于 2020-3-19 23:05:34 | 显示全部楼层
新手,还有很多不会
#include <stdio.h>

void main()
{
    int i, j, result;
    for (i = 1; i <= 9; i++)
    {
        for (j = 1; j <= i; j++)
        {
            printf("%d*%d=%-2d ", j, i, i * j);
        }
        putchar('\n');
    }

    return 0;
}
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-3-21 00:51:17 | 显示全部楼层
print("来和我玩一个猜数字游戏吧!")
print("来猜猜现在我想的数字是几,1~10之间。")
temp = input("请输入你的答案 ")
answer = 3
number = 3
while number:
    if temp ==answer:
        print("You are so clever!")
        break
    print("That's not what I thought! ")
    print("You will have",number-1,"chances!")
    i = input("Try again!")
    number -=1
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-3-21 10:09:07 From FishC Mobile | 显示全部楼层
def earnest(a,b,c):
        x1 = +((b**2)/((2*a)**2) - c/a)**(1/2) - b/(2*a)
        x2 = -((b**2)/((2*a)**2) - c/a)**(1/2) - b/(2*a)
        return x1,x2
print(earnest(1,6,-7))
a = int(input('请输入a:'))
b = int(input('请输入b:'))
c = int(input('请输入c:'))
temp = earnest(a,b,c,)
print(temp)
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-3-23 16:57:47 | 显示全部楼层
>>> print("80*365*24*60*60")
80*365*24*60*60
>>> print(80*365*24*60*60)
2522880000
>>> 我是不是特别笨
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-5-9 19:44:50 | 显示全部楼层
import random
scel = random.randint(1,100)
print("-------------猜数字------------")
temt=input("请输入1到100以内的值:")
num=int(temt)
while num != scel:
    temt=input("输错了,请重新输入吧:")
    num=int(temt)
    if num == scel:
        print("你也太聪明了")
        print("猜中也没奖励")
    else:
        if 1<= num < scel:
            print("小了,小了")
        else:
            if scel < num <= 100:
                print("大了,大了!!")
            else:
                print("超出1到100数字范围了")
print('好了,游戏结束!')
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-5-10 14:49:51 | 显示全部楼层
@echo off
set string="为什么叫小甲鱼呀"
echo %string%
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-9-22 17:35

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表