#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; };
......................
阅读全部
|
gougoudan
贴于 2020年6月17日 10:40
hide
bbsi
#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";
......................
阅读全部
|
gougoudan
贴于 2020年6月17日 10:40
hide
bbsi
//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;
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 15:37
hide
bbsi
//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;
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 15:17
hide
bbsi
#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
{
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 14:51
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
// 坐标
typedef struct
{
int x, y;
}SPostion;
// 栈中数据
typedef struct
{
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 14:36
hide
bbsi
#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(" ");
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 08:53
hide
bbsi
#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(" ");
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 08:53
hide
bbsi
#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(" ");
......................
阅读全部
|
gougoudan
贴于 2020年6月16日 08:53
hide
bbsi
//头文件
#include<>
#include<>
#include<>
//定义多项式的项
typedef struct Polynomial{
float coef;
int expn;
struct Polynomial *next;
}*Polyn,Polynomial;
......................
阅读全部
|
a18235516941
贴于 2020年6月15日 10:31
hide
bbsi