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

int main() {
    double a,b,c;
    printf("enter a,b and c:");
    scanf("%lf,%lf,%lf",&a,&b,&c);
    
    if (a==0&&b==0&&c==0){
        printf("方程不存在");
    }
    else if(a==0&&b!=0){
......................
阅读全部 | 金橘棕白 贴于 2025年10月13日 14:52     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绘制一个心形图案:");
......................
阅读全部 | 谢飞 贴于 2025年9月30日 16:42     hide bbsi
#include <iostream>
using namespace std;
int main()
{
    string n;
    string a;
    string b;
    cin >> n;
    cin >> a >> b;
    cout << "请输入账户名:" << endl;
    cout << n << endl;
    cout << "请设置密码:" << endl;
......................
阅读全部 | HZH是中国人 贴于 2025年9月8日 07:50     hide bbsi
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
static struct FastInput {
  static constexpr int BUF_SIZE = 1 << 20;
  char buf[BUF_SIZE];
  size_t chars_read = 0;
  size_t buf_pos = 0;
  FILE *in = stdin;
  char cur = 0;
 
  inline char get_char() {
    if (buf_pos >= chars_read) {
......................
阅读全部 | yywx2023 贴于 2025年9月6日 09:44     hide bbsi
#include<string.h>
struct student
{int num;
char name[20];
float score[3];
}stu;

main()
{scanf("%d%s%f%f%f",&stu.num,&stu.name,&stu.score[0], /*要记得每个都要加取地址符*/
&stu.score[1],&stu.score[2]);
void print(struct student *);/*不能在此声明函数*/
print(&stu);
......................
阅读全部 | wengzixi 贴于 2025年7月29日 18:28     hide bbsi
#include <iostream>
#include <format>
#include <vector>
#include <string>
#include <thread>
#include <chrono>
#include <random>
#include <ranges>
#include <conio.h>
#include <windows.h>
#include <ctime>
#include <cstdlib>
......................
阅读全部 | wengzixi 贴于 2025年7月29日 13:54     hide bbsi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// 函数声明
int add(int a, int b);
int is_prime(int num);
void reverse_string(char *str);

int main() {
    // 测试整数加法
    int sum = add(5, 7);
......................
阅读全部 | oklanbo 贴于 2025年6月5日 14:26     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绘制一个心形图案:");
......................
阅读全部 | 咪咪牛 贴于 2025年5月19日 22:37     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绘制一个心形图案:");
......................
阅读全部 | MIAO0309ZHEN 贴于 2025年5月9日 18:16     hide bbsi
(defun sayHello(name)
    (format t "Hello ~a" name)
)
(sayHello "编程中国")

(write-line "")
(write-line "")

; 练习一下循环的使用
(loop for a from 1 to 20
    do (format t "我爱编程中国 ~d 次" a)
    (write-line "")
......................
阅读全部 | miguo 贴于 2025年4月12日 09:28     hide bbsi
1 2 3 4 5 6 7 8 9 10 下一页