首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C++
#include<iostream>
using namespace std;
int fab(int n);
int main()
{
int n,y;
cout<<"please input a number:"<<endl;
cin>>n;
y=fab(n);
cout<<"n!="<<endl;
return 0;
}
......................
阅读全部 | 冰释芊芊 贴于 2014年4月19日 23:58     hide bbsi
//是输入6就会报错,为什么?

#include<iostream>
using namespace std;
#define sizem ((size / 2 - 1) / 2)
#define sizeh (size / 2)
#define sizesq (sizeh * sizeh)

void main()
{
int size = 0;    //魔方阵大小
int x = 0, y = 0;        //下一个数字所放的位置
......................
阅读全部 | 紫罗兰丹丹 贴于 2014年4月10日 20:39     hide bbsi
//头文件
//杨氏矩阵,1~9填入3*3矩阵,由左向右递减,由上向下递减。

#include<iostream>
using namespace std;

class grid
{
public:
    void outputjz();           //输出矩阵
    void arrange();            //求解并输出
    grid()                     //构造函数
......................
阅读全部 | 紫罗兰丹丹 贴于 2014年4月9日 06:44     hide bbsi
uhasn
asdlka=s=da
asdm254132a
ase2864
阅读全部 | qq819587248 贴于 2014年2月18日 16:06     hide bbsi
#include"SeqList.h"
#include"SeqQueue.h"
const int MaxVertices=10;
const int MaxWeight=10000;
class AdjMWGraph
{
private:
SeqList Vertices;//顶点信息的线性表
int Edge[MaxVertices][MaxVertices];
int numOfEdges;
public:
AdjMWGraph(const int sz=MaxVertices); 
......................
阅读全部 | DTaiLi 贴于 2014年1月7日 17:16     hide bbsi
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <string.h>
#include "stdio.h"

typedef struct
{  
float coef;//结点类型
    int expn;
}polynomial;

......................
阅读全部 | 野人部落 贴于 2013年12月31日 18:08     hide bbsi
#include <iostream>
#include<math.h>
using namespace std;
int main()
{  
    cout<<"===============================\n";
    cout<<"     学号:12335656555         \n     姓名:空间看韩剧         \n     班级:1233         \n     版本:v201312254          \n ";
    cout<<"===============================\n";
cout<<"    题目:数组排序及字符串处理         \n";
    cout<<"    请选择:               \n    1: 四数排序问题\n    2:最大利息问题      \n";
    cout<<"===============================\n";
int m;
......................
阅读全部 | jiangchengzi 贴于 2013年12月23日 19:35     hide bbsi
#include <iostream>

using namespace std;

int main()
{

    int k(0);
    int a[10];
    float sum(0);
    float max  = 10000000;
    float min  = -1000000;
......................
阅读全部 | yny 贴于 2013年12月16日 17:10     hide bbsi
#include <iostream>

using namespace std;

int main()
{
  for (int i = 1; i < 48; i++ )
  {
      for (int j = 1; j < 48; j++)
      {
          for (int k = 1; k < 48; k++)
          {
......................
阅读全部 | yny 贴于 2013年12月15日 17:20     hide bbsi
#ifndef _POINT_H
#define _POINT_H
class Point{
public:
Point();
Point(int x,int y);
~Point();
void move(int newx,int newy);
int getx() const {return x;};
int gety() const {return y;};
static void showcount();
private:
......................
阅读全部 | zxh371 贴于 2013年12月4日 11:24     hide bbsi
上一页 27 28 29 30 31 32 33 34 35 36 下一页