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

typedef union
{
   double f;
   uint32_t i[2];
}Packet;

#define M  ((1<<20)-1)
void test( double f)
......................
阅读全部 | liangbch 贴于 2019年12月16日 10:15     hide bbsi
#include<iostream>
using namespace std;
func(int a, int b)
{
static int m, i = 2;
i += m + 1;
m = i + a + b;
return(m);
}
int main()
{
int k = 4, m = 1, p;
......................
阅读全部 | 莫说 贴于 2019年11月16日 19:02     hide bbsi
#include <iostream>
using namespace std;

int function(int n){
    int m;
    if(n<0){
    cout<<"输入错误"<<endl;
    return 0;
}
else if(n==1){
    m=1;
 }
......................
阅读全部 | 徐二爷 贴于 2019年11月7日 12:25     hide bbsi
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int love[9][37] = 
{
0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
......................
阅读全部 | 神犇dengyuhy 贴于 2019年8月19日 16:59     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编程中国送我一颗小心心:");
......................
阅读全部 | lz3189261294 贴于 2019年8月1日 20:33     hide bbsi
#include<bits/stdc++.h>
using namespace std;
namespace random
{
int randint(int n)
{
srand(time(0));
return rand()%n;
}
}
using namespace random;
int main(void)
......................
阅读全部 | cstdio 贴于 2019年3月7日 18:14     hide bbsi
// Wrapper of C-language FILE struct -*- C++ -*-

// Copyright (C) 2000-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......................
阅读全部 | cstdio 贴于 2019年2月18日 10:21     hide bbsi
// Iostreams base classes -*- C++ -*-

// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......................
阅读全部 | cstdio 贴于 2019年2月18日 10:17     hide bbsi
#include <iostream>
#include <math.h>
int main()
{
std::cout<<"输入三角形的边长a、b、c:\n";
double a=0,b=0,c=0,s=0,y=0;
std::cin>>a>>b>>c;
if (a+b>c&&a+c>b&&c+b>a)
{
double s=(a+b+c)/2;
}
else {
......................
阅读全部 | 浅蓝、白色 贴于 2019年2月7日 15:14     hide bbsi
#include<iostream>
using namespace std;
class Stackexception{
char* why;
public:
Stackexception(char* p):why(p){}
char* reason()
{
return why;
}
};
template<typename T>
......................
阅读全部 | cstdio 贴于 2019年2月5日 11:27     hide bbsi
上一页 11 12 13 14 15 16 17 18 19 20 下一页