计算机实习报告范文

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

精编WORD文档下载可编缉打印下载文档,远离加班熬夜计算机实习报告范文篇一:计算机实习报告计算机实习报告目录1.魔方阵..............................................................11.1设计方案..........................................................11.2流程图..........................................................11.3部分源代码......................................................21.4程序相关截图....................................................111.5设计总结..........................................................122.动画设计...........................................................132.1设计方案.........................................................132.2相关截精编WORD文档下载可编缉打印下载文档,远离加班熬夜图.........................................................132.3设计总结..........................................................143.测量身体BMI指数和体脂率的健康计算器.............................153.1设计方案.........................................................153.2流程图.........................................................153.3部分源代码.....................................................163.4程序相关截图...................................................243.5设计总结..........................................................254.字符串处理..........................................................254.1设计方案..........................................................254.2流程图..........................................................264.3部分源代码...................................................精编WORD文档下载可编缉打印下载文档,远离加班熬夜..264.4程序相关截图...................................................294.5设计总结..........................................................315.数学函数作图器.....................................................315.1设计方案..........................................................315.2流程图..........................................................315.3部分源代码......................................................325.4程序相关截图...................................................465.5设计总结..........................................................491.魔方阵n为初始输入的数字(为了显示效果,使n≤15),把整数1到n2排成一个n×n方阵,使方阵中的每一行,每一列以及对角线上的数之和都相同。输出这个方阵。1.1设计方案精编WORD文档下载可编缉打印下载文档,远离加班熬夜程序使用语言:C++开发环境:VisualStudio2021设计思路:分为奇魔方、单偶魔方和双偶魔方三种情况。由1开始填数,将1放在第0行的中间位置。将魔方阵想象成上下、左右相接,每次往左上角走一步;如果左上角超出上方边界,则在最下边相对应的位置填入下一个数字;左上角超出左边边界,则在最右边相应的位置填入下一个数字;如果找到的位置已填入数据,则在同一列下一行填入下一个数字。窗口部分,用C++/CLI编了一个简单的窗口,还加了一张红叶的背景图片以增加美观性,可以拖拽任意部位拖动窗体,可以实现最大最小化和关闭功能。该程序能实现输出n从3-15的魔方阵,范围之外的将会报错,这是用简单的if语句进行控制。整个魔方阵用二维数组来实现。1.2流程图1.3部分源代码cube.cpp这是主应用程序源文件。包含用于显示窗体的代码。//cube.cpp:主项目文件。#includestdafx.h#includeForm1.husingnamespacecube;精编WORD文档下载可编缉打印下载文档,远离加班熬夜[STAThreadAttribute]intmain(array<System::String^>^args){//在创建任何控件之前启用WindowsXP可视化效果Application::EnableVisualStyles();Application::SetCompatibleTextRenderingDefault(false);//创建主窗口并运行它Application::Run(gcnewForm1());return0;}Form1.h包含窗体类和InitializeComponent()函数的实现。#pragmaoncenamespacecube{usingnamespaceSystem;usingnamespaceSystem::ComponentModel;usingnamespaceSystem::Collections;usingnamespaceSystem::Windows::Forms;usingnamespaceSystem::Data;usingnamespaceSystem::Drawing;///<summary>///Form1摘要///</summary>publicrefclassForm1:publicSystem::Windows::Forms::Form{public:Form1(void)精编WORD文档下载可编缉打印下载文档,远离加班熬夜{InitializeComponent();////TODO:在此处添加构造函数代码//}protected:///<summary>///清理所有正在使用的资源。///</summary>~Form1(){if(components){deletecomponents;}}private:System::Windows::Forms::Label^label1;private:System::Windows::Forms::TextBox^textBox1;private:System::Windows::Forms::Button^button1;private:System::Windows::Forms::TextBox^textBox2;protected:private:///<summary>///必需的设计器变量。///</summary>System::ComponentModel::Container^components;#pragmaregionWindowsFormDesignergeneratedcode///<summary>///设计器支持所需的方法-不要///使用代码编辑器修改此方法的内容。///</summary>voidInitializeComponent(void){System::ComponentModel::Co精编WORD文档下载可编缉打印下载文档,远离加班熬夜mponentResourceManager^resources=(gcnewSystem::ComponentModel::ComponentResourceManager(Form1::typeid));this->label1=(gcnewSystem::Windows::Forms::Label());this->textBox1=(gcnewSystem::Windows::Forms::TextBox());this->button1=(gcnewSystem::Windows::Forms::Button());this->textBox2=(gcnewSystem::Windows::Forms::TextBox());this->SuspendLayout();////label1//this->label1->AutoSize=true;this->label1->BackColor=System::Drawing::Color::Transparent;this->label1->Font=(gcnewSystem::Drawing::Font(L微软雅黑,13));this->label1->Location=System::Drawing::Point(43,32);this->label1->Name=Llabel1;this->label1->Size=System::Drawing::Size(93,24);this->label1->TabIndex=0;this->label1->Text=L请输入n:;//精编WORD文档下载可编缉打印下载文档,远离加班熬夜//textBox1//this->textBox1->Location=System::Drawing::Point(143,34);this->textBox1->Name=LtextBox1;this->textBox1->Size=System::Drawing::Size(89,21);this->textBox1->TabIndex=1;////button1//this->button1->Location=System::Drawing::Point(255,29);this->button1->Name=Lbutton1;this->button1->Size=System::Drawing::Size(75,30);this->button1->TabIndex=2;this->button1->Text=L生成;this->button1->UseVisualStyleB

1 / 23
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功