首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C++
#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
#include <iostream>
#include <conio.h>//使用getch的头文件
using namespace std;
int main()

{
int j,k;
 //   char n[80];//char后面要带有常量或者是符号常量,确保可以分配给变量储存空间 
// cout<<"helloworld"<<endl;
    

//
......................
阅读全部 | qmsb2580 贴于 2019年2月3日 01:07     hide bbsi
#include <iostream>
#include <map>
#include <set>
#include <cstring>
#include <stack> 
#include <vector>
#include <algorithm>
using namespace std;
typedef set<int> Set;
map<Set,int> idcache;
vector<Set> setcache;
int id(Set x){
......................
阅读全部 | 陈威臻 贴于 2019年1月6日 20:09     hide bbsi
上一页 12 13 14 15 16 17 18 19 20 21 下一页