作业
qq_847607340
这个作者很懒,什么都没留下…
展开
-
筛选字符串特定内容
#include <iostream>#include <stdio.h>#include <string>#include <string.h>using namespace std;int main(){ string tmp = ""; cin >> tmp; int len = tmp.length(); printf("out:\n"); char* p = new char[len.原创 2021-04-15 23:25:35 · 267 阅读 · 0 评论 -
两级反转
#include<stdio.h>#include<string.h>void change(char *arr,int first ,int last){ int f = first; int l = last; char temp = 0;/* printf("first= %d\n",f); printf("last= %d\n",l);*/ while(1) { temp = arr[f]; .原创 2021-04-14 22:15:42 · 368 阅读 · 1 评论 -
计算已经生活了多少天的小题目
读书时的小测试题.重新写一遍 .可以将出生和当前日期定为结构体 这样传值就很方便.#include <stdio.h>#include <math.h>#include <stdbool.h>int leap_year_arr[12] = {31,29,31,30,31,30,31,31,30,31,30,31}; //闰年int Ordinary_year_arr[12] = {31,28,31,30,31,30,31,31,30,31,30,31}原创 2021-03-07 23:18:47 · 184 阅读 · 1 评论