首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    int a;
    std::cin >> a;
    for (int i=1;i<a;i++) {
        for (int j= 0;j<a-i;j++) {
            cout<<" ";
        }
        for (int j=1;j<=i;j++) {
            cout<<'#';
        }
......................
阅读全部 | whywu 贴于 2025年7月29日 21:19     hide bbsi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#define M 50
struct date {
    int year;
    int month;
    int day;
};
struct library {
    int book_num;           // 图书编号
......................
阅读全部 | q112q 贴于 2025年7月7日 11:14     hide bbsi
#include <iostream>
using namespace std;

int main(){
    
    return 0;
}
阅读全部 | hamilyjing 贴于 2025年4月11日 14:15     hide bbsi
#include <iostream>
using namespace std;

int main(){
    
    return 0;
}
阅读全部 | hamilyjing 贴于 2025年4月11日 14:15     hide bbsi
#include <stdio.h>
#define MaxSize 10
typedef struct Queue{
    int data[MaxSize];
    int head,tail;
}Queue;

void InitQueue(Queue &S){
    S.head=0;
    S.tail=0;
}

......................
阅读全部 | sdcz 贴于 2025年3月19日 23:28     hide bbsi
#include <stdio.h>
#define MaxSize 50
//创建栈以及栈的基本操作
typedef struct Stack{
    int data[MaxSize];
    int top;
}Stack;

void InitStack(Stack &S){
    S.top=0;
}

......................
阅读全部 | sdcz 贴于 2025年3月19日 23:20     hide bbsi
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
typedef struct Lnode{
    struct Lnode* next;
    char data;
}Lnode,*ListLink;

//第一种方法
/*bool match(ListLink L,int n){
    char A[n/2];Lnode *p=L;
    for(int i=0;i<=(n-1)/2;i++){p=p->next;A[i]=p->data;}
......................
阅读全部 | sdcz 贴于 2025年3月19日 00:10     hide bbsi
#include<stdlib.h>
#include<stdio.h>
#define maxsize 100
typedef struct{
    int data[maxsize];
    int length;
}List;

int SearchList(List &L,int e){
    int min =0;int max=L.length-1;int mean=(max+min)/2;
    if(L.data[min]==e){return min+1;}
    if(L.data[max]==e){return max+1;}
......................
阅读全部 | sdcz 贴于 2025年3月12日 22:55     hide bbsi
#include<stdio.h>
#include<stdlib.h>
#define Maxsize 10
typedef struct{
    int data;
    int next;
}node,ListLink[Maxsize];

int main(){
    node A[Maxsize];
    printf("sizeof(%zu)\n",sizeof(A));
    node a;
......................
阅读全部 | sdcz 贴于 2025年3月12日 21:08     hide bbsi
#include<stdio.h>
#include<stdlib.h>
typedef struct Lnode{
    int data;
    Lnode *next;
}Lnode, *ListLink;

//创建链表
bool InitList(ListLink L){
    L=(ListLink)malloc(sizeof(Lnode));
    L->next=NULL;
    return true;
......................
阅读全部 | sdcz 贴于 2025年3月12日 20:30     hide bbsi
1 2 3 4 5 6 7 8 9 10 下一页