会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
zhongxiaozheng
博客园
首页
新随笔
联系
订阅
管理
2020年4月23日
C++--在屏幕上显示指定的文本文件的内容
摘要: #include<iostream>#include<fstream>using namespace std;int main(){ ifstream ifle; char fn[20],ch; cout<<"输入文件名:"; cin>>fn; ifle.open(fn); if(!ifle) {
阅读全文
posted @ 2020-04-23 00:02 zhongxiaozheng
阅读(1287)
评论(0)
推荐(0)
2020年4月22日
C++-从键盘输入一批整数(以-1作为结束输入)并保存到文本文件xxxk1.txt中
摘要: #include<iostream.h>#include<fstream.h>#include<stdlib.h>void main(){ ofstream fout("xxxk1.txt"); if(!fout) { cout<<"文件没有打开!"<<endl; exit(1); } int x;
阅读全文
posted @ 2020-04-22 23:48 zhongxiaozheng
阅读(1059)
评论(0)
推荐(0)
2020年4月21日
C++--用带有默认参数的函数实现求前两个及三个正整数中的最大值
摘要: #include<iostream>using namespace std;int main(){ int max(int a,int b,int c=0); int a,b,c,m1,m2; cout<<"请输入两到三个正整数字"<<endl; cin>>a>>b>>c; m1=max(a,b,c
阅读全文
posted @ 2020-04-21 15:16 zhongxiaozheng
阅读(1507)
评论(0)
推荐(0)
C++--程序实现大写字母转换成小写字母
摘要: #include<iostream.h>void main(){ char a; int i=32; cout<<"输入一个大写字母:"<<endl; cin>>a; if(a>='A'&&a<='Z') a=a+i; cout<<"转换成小写字母是:"<<a<<endl;}
阅读全文
posted @ 2020-04-21 14:51 zhongxiaozheng
阅读(8571)
评论(0)
推荐(0)
python-学生成绩管理系统(简单版)
摘要: ''' 学生成绩系统 ''' class Student: def __init__(self,No,Name,Gender,Age): self.No=No self.Name=Name self.Gender=Gender self.Age=Age def show(self): print("
阅读全文
posted @ 2020-04-21 09:56 zhongxiaozheng
阅读(2813)
评论(0)
推荐(0)
公告