首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include <stdio.h>

#define PRICE 30;

int main() {
    float num,total;
    
    scanf("%f", &num);

    total=num*PRICE;
    
    printf("total = %f \n", total);
......................
阅读全部 | 蔡小菜 贴于 2022年1月25日 18:44     hide bbsi
#include <stdio.h>

#define PRICE 30;

int main() {
    float num,total;
    
    num=10.5;
    total=num*PRICE;
    
    printf("total = %f \n", total);
}
阅读全部 | 蔡小菜 贴于 2022年1月25日 18:38     hide bbsi
/**
 * 【程序2】
 * 题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月
 *       后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
 * 程序分析:兔子的规律为数列1,1,2,3,5,8,13,21....
 */
#include <stdio.h>
 
int main()
{
    int m[23];
    int i;
......................
阅读全部 | clearlove07 贴于 2022年1月24日 15:15     hide bbsi
#五角星 画图
import  turtle
turtle.bgcolor("red")
turtle.penup()
turtle.goto(300,-300)
turtle.pendown()
turtle.forward(180)
turtle.left(72)
turtle.forward(180)
turtle.right(144)
turtle.forward(180)
turtle.left(72)
......................
阅读全部 | wde 贴于 2022年1月23日 19:17     hide bbsi
#include <stdio.h>

int main() {
printf("我叫彭江华来自湘西州\n\n");

// 练习一下循环的使用
int i;
for (i=1; i<=20; i++) {
printf("彭江华是我爸爸 %d 次\n", i);
}

printf("\n\n绘制一个五星红旗图案:");
......................
阅读全部 | wde 贴于 2022年1月23日 19:02     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) {
......................
阅读全部 | mature119 贴于 2022年1月19日 22:02     hide bbsi
#include <stdio.h>

int main() {
printf("我在编程中国学C语言\n\n");

// 练习一下循环的使用
int i;
for (i=1; i<=20; i++) {
printf("我爱编程中国 %d 次\n", i);
}

printf("\n\n绘制一个心形图案:");
......................
阅读全部 | 季白的杜衡 贴于 2022年1月12日 11:04     hide bbsi
Module Program
Sub Main(args As String())
Console.WriteLine("我在编程中国学VB.NET")
Console.WriteLine()

'练习一下循环的使用
For i As Integer = 1 To 20
Console.WriteLine("我爱编程中国 {0} 次", i)
Next

Console.Write(vbLf & vbLf & "绘制一个心形图案:")

......................
阅读全部 | kuankuan 贴于 2022年1月11日 11:16     hide bbsi
#include<stdio.h>
int main()
{
int x,y,z;
x=y=z=3;
printf("%d",x+++x++);
printf("\n%d",(++y)+(++y));
printf("\n%d",(++z)+(z++));
}
阅读全部 | 谦忍鸣 贴于 2022年1月4日 13:48     hide bbsi
print("我在中国学Python\n")

# 练习一下循环的使用
for i in range(1, 21):
print(f"我爱编程中国 {i} 次")
阅读全部 | ycming1717a 贴于 2022年1月1日 23:52     hide bbsi
上一页 58 59 60 61 62 63 64 65 66 67 下一页