首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴gougoudan的代码贴全部
#include <stdio.h>

void transpose(int mtx[3][3])
{
    int t;
    t = mtx[0][1]; mtx[0][1] = mtx[1][0]; mtx[1][0] = t;
    t = mtx[0][2]; mtx[0][2] = mtx[2][0]; mtx[2][0] = t;
    t = mtx[2][1]; mtx[2][1] = mtx[1][2]; mtx[1][2] = t;
}
int main()
{
    int i;
......................
阅读全部 | 2020年6月17日 11:02
#include <stdio.h>
int isprime(int n)
{
    if (n == 1) return 1;
    for (int i = 2; i*i <= n; i++)
        if (n%i == 0) return 0;
    return n > 1;
}
void xuanxian2()
{
    int n; int m;
    int i, s = 0;
......................
阅读全部 | 2020年6月17日 10:55
#include <stdio.h>
void shiftLeft(char str[], int count)
{
    int i;
    char temp[120];
    char* s1, *s2;
    for (i = 0; i < count; ++i){
        temp[i] = str[i];
    }
    s1 = str + count;
    s2 = str;
    while (*s2 = *s1){ ++s2; ++s1; };
......................
阅读全部 | 2020年6月17日 10:40
#include <stdio.h>
int substr(char str1[], char str2[], int index)
{
    int n = 0;
    char* s = str1;
    while (*s++) ++n;
    if (0 <= index && index < n){
        s = str1 + index;
        while(*str2++ = *s++);
        return 1;
    }
    s = "IndexError";
......................
阅读全部 | 2020年6月17日 10:40
//StudybarCommentBegin
#include <iostream>
#include <cmath>
using namespace std;
class Point
{
protected:
    double x, y;
public:
    Point(double x = 0, double y = 0)
    {
        this->x = x; this->y = y;
......................
阅读全部 | 2020年6月16日 15:37
//StudybarCommentBegin
#include <iostream>
#include <cmath>
using namespace std;
class Point
{
protected:
    double x, y;
public:
    void SetPoint(double x = 0, double y = 0)
    {
        this->x = x; this->y = y;
......................
阅读全部 | 2020年6月16日 15:17
#include <iostream>
using namespace std;

class SomeClass
{
public:
    int ma;
    double mb;
    SomeClass(){}
    SomeClass(int a, double b){ ma = a; mb = b; }
    bool operator==(const SomeClass& k) const
    {
......................
阅读全部 | 2020年6月16日 14:51
#include <stdio.h>
#include <stdlib.h>

// 坐标
typedef struct
{
    int x, y;
}SPostion;

// 栈中数据
typedef struct 
{
......................
阅读全部 | 2020年6月16日 14:36
#include <stdio.h>
#include <ctype.h>
int main()
{
    char s[200] = {};
    gets(s);
    char *p = s;
    char c = *p++;
    for (; *p;){
        putchar(c);
        if (isdigit(*p) && isalpha(c)){
            printf(" ");
......................
阅读全部 | 2020年6月16日 08:53
#include <stdio.h>
#include <ctype.h>
int main()
{
    char s[200] = {};
    gets(s);
    char *p = s;
    char c = *p++;
    for (; *p;){
        putchar(c);
        if (isdigit(*p) && isalpha(c)){
            printf(" ");
......................
阅读全部 | 2020年6月16日 08:53
上一页 1 2 3 4 5 6 7 8 9 10 下一页
gougoudan