-
实验1 现代C++编程初体验
实验任务1 task1.cpp // 现代C++标准库、算法库体验 // 本例用到以下内容: // 1. 字符串string, 动态数组容器类vector、迭代器 // 2. 算法库:反转元素次序、旋转元素 // 3. 函数模板、const引用作为形参 #include <iostream> #in -
实验1 现代C++编程初体验
任务1: 源代码task1.cpp 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 6 7 template<typename T> 8 void output(const -
oop实验一
实验任务一 源代码 void test1(); void test2(); void test3(); int main() { std::cout << "测试1: \n"; test1(); std::cout << "\n测试2: \n"; test2(); std::cout << "\n测 -
高级语言程序设计第一次作业*
这个作业属于哪个课程:高级语言程序设计 这个作业要求在哪里: https://edu.cnblogs.com/campus/fzu/gjyycx/homework/13558 学号:102400111 姓名:蔡伟仡 1.安装Devc++ 已安装并更新版本 2.作业 2.1 一个简单的c程序 根据课本 -
实验2
task1.c 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 #define N1 80 7 #define N2 35 8 9 int main(){ 10 int cnt; 11 int -
实验二
Task1: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 #define N1 80 6 #define N2 35 7 int main() 8 { 9 int cnt; 10 int -
实验2
任务1:1.除去后第一次生成随机学号,当再次运行程序则生成与第一次一样的学号。2.作用为在当前程序重新随机生成学号。 任务2:没有影响 语义为重新运行循环中的程序。 任务3: #include <stdio.h> int main() { char color; while(1) { printf( -
实验二
task1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 80 #define N2 35 int main() { int cnt; int random_major, random_ -
实验任务2
实验任务1 问题1:代码 srand(time(NULL));以系统时间作为随机数种子来生成随机数,生成学号后四位,去掉之后生成的学号是固定的。 问题2:这个代码的功能是限定数字范围,取用系统时间作为种子,生成五个随机数,并和两个专业班学生的学号前缀组成学号,达到抽取随机五个人的目的。 实验任务2 -
博客地址
https://www.cnblogs.com/Zenxu/ -
实验2
实验任务1 源代码 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 5 #define N 5 6 #define N1 80 7 #define N2 35 8 9 int main(){ 10 int cnt; 1 -
第一次算法作业
一、编码规范 1.命名规范 命名需要见名知意,需要全程使用英文单词,杜绝拼音和用简单字母表示的无意义命名。具体要求为:变量采用小写加下划线或小驼峰命名(如 student_age 或 studentAge),函数和类名用大驼峰命名(如 calculateArea 或 UserInfo),函数名尽量体 -
博客园地址
https://www.cnblogs.com/game-8 -
实验1
任务1 源代码task1.cpp 1 // 现代C++标准库、算法库体验 2 // 功能:使用reverse/reverse_copy/rotate操作string和vector,体验标准库便捷性 3 #include <iostream> 4 #include <string> 5 #includ -
实验作业2
实验1: 点击查看代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 80 #define N2 35 int main () { int cnt; int random_major, -
博客地址
https://www.cnblogs.com/Carloschan-Giraffe