首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴gougoudan的代码贴全部
#include "stdio.h"
int main()
{
    int a[10];
    for (int i = 0; i < 10; ++i){
        scanf("%d", &a[i]);
    }

    int maxi = 0;
    int max = a[0];
    for (int i = 1; i < 10; ++i){
        if (max < a[i]){
......................
阅读全部 | 2020年6月6日 11:03
#include "stdio.h"
int main()
{
    int total = 0, mul;
    for (int i = 1; i <= 20; ++i){
        mul = 1;
        for (int j = 1; j <= i; ++j){
            mul *= j;
        }
        total += mul;
    }
    printf("total = %d\n", total);
......................
阅读全部 | 2020年6月6日 10:57
int main()
{
    int a[3][4];
    for (int i = 0; i < 3; ++i){
        for (int j = 0; j < 4; ++j){
            scanf("%d", &a[i][j]);
        }
    }

    int maxi = 0, maxj = 0;
    int max = a[0][0];
    for (int i = 0; i < 3; ++i){
......................
阅读全部 | 2020年6月6日 10:54
#include "stdio.h"
int main()
{
    int a[3][4];
    for (int i = 0; i < 3; ++i){
        for (int j = 0; j < 4; ++i){
            scanf("%d", &a[i][j]);
        }
    }

    int maxi = 0, maxj = 0;
    int max = a[0][0];
......................
阅读全部 | 2020年6月6日 10:50
#include <iostream>
#include <iomanip>
#include <cstring> // strcpy and strcat prototypes
#include <cstdlib> // exit prototype
using namespace std;

class String
{
    friend ostream &operator<<(ostream &, const String &);
    friend istream &operator>>(istream &, String &);
public:
    String(const char * = ""); // conversion/default constructor
......................
阅读全部 | 2020年6月3日 14:48
#include <iostream>
using namespace std;
class Skill

    int *nSkill;
public:
    Skill(int n) {
        nSkill = new int;
        *nSkill = n;
        cout << "member object " << (*nSkill) <<" constructed" << endl;
    }
    ~Skill(){
......................
阅读全部 | 2020年6月1日 20:01
#include <iostream>
using namespace std;
class Point
{
private:
    double x;
    double y;

public:
    Point(double ix, double iy) :x(ix), y(iy){ cout << "Point Object Constructed." << endl; }
    virtual ~Point(){ cout << "Point Object Destructed." << endl; };
    virtual void Show() { cout << "x=" << x << ",y=" << y << endl;; }
......................
阅读全部 | 2020年6月1日 19:48
//010E
#include "stdio.h"
#include "stdlib.h"
int find_repeat_number(int arr[], int n)
{
    int ret = -1;
    if (n > 1){
        char* flagArr = (char*)malloc(sizeof(char)* n);
        for (int i = n; i--; flagArr[i] = 0);
        for (int i = 0; i<n; ++i){
            int number = arr[i];
            if (flagArr[number]){
......................
阅读全部 | 2020年5月26日 09:56
//013H
#include "stdio.h"

void str_space_replace(const char* src,  char* dst)
{
    for (char ch; ch = *src; ++src){
        if (' ' == ch){
            *dst++ = '%';
            *dst++ = '2';
            *dst++ = '0';
        }
        else{
......................
阅读全部 | 2020年5月26日 09:54
#include <stdio.h>
#define SX 10
#define SY 10

struct point
{
    short x;
    short y;
};
int search(const char m[SX][SX + 1], point path[], int count, const point& endPt);
void main()
{
......................
阅读全部 | 2020年5月25日 16:22
上一页 3 4 5 6 7 8 9 10 11 12 下一页
gougoudan