数据结构示例之简单薪资管理系统
来源:互联网 发布:网络监控工作的短板 编辑:程序博客网 时间:2024/05/22 04:49
以下为简单薪资管理系统示例:
1.用c语言实现的版本
#include<stdio.h>#include<stdlib.h>void main(){int Employee[10]={27000,32000,32500,27500,30000,29000,31000,32500,30000,26000};int Index;int NewSalary;int Selection;while(1){printf("===================================================\n");printf("Simple Employee Salary Management System \n");printf("1.Display employee salary \n");printf("2.Modify employee salary \n");printf("3.Quit \n");printf("Please input your choose:");scanf("%d",&Selection);if(Selection==1||Selection==2){printf("Please input the employee number(n<10):");scanf("%d",&Index);if(Index<10){printf("Employee Number is %d.",Index);printf("The Salary is %d\n",Employee[Index]);}else{printf("##The error employee number!\n");exit(1);}}switch(Selection){case 1:break;case 2:printf("**Please input new salary:");scanf("%d",&NewSalary);Employee[Index]=NewSalary;break;case 3:exit(1);break;}printf("\n");}}
2. 用c++实现的版本
#include<iostream>#include<stdlib.h>void main(){int Employee[10]={27000,32000,32500,27500,30000,29000,31000,32500,30000,26000};int Index;int NewSalary;int Selection;while(1){std::cout<<"==================================================="<<std::endl;std::cout<<"Simple Employee Salary Management System "<<std::endl;std::cout<<"1.Display employee salary "<<std::endl;std::cout<<"2.Modify employee salary "<<std::endl;std::cout<<"3.Quit "<<std::endl;std::cout<<"Please input your choose:";std::cin>>Selection;if(Selection==1||Selection==2){std::cout<<"Please input the employee number(n<10):";std::cin>>Index;if(Index<10){std::cout<<"Employee Number is "<<Index<<std::endl;std::cout<<"The Salary is "<<Employee[Index]<<std::endl;}else{std::cout<<"##The error employee number!"<<std::endl;exit(1);}}switch(Selection){ case 1: break; case 2: std::cout<<"**Please input new salary:"; std::cin>>NewSalary; Employee[Index] = NewSalary; break; case 3: exit(1); break; }std::cout<<std::endl; }}运行结果:
0 0
- 数据结构示例之简单薪资管理系统
- 薪资管理系统的收获
- 数据结构之学生管理系统
- 数据结构示例之简单多项式相加
- Spring实战-雇员薪资管理系统
- PHP工资管理系统、考勤管理系统、薪资管理系统
- 数据结构简单的停车管理系统
- Extjs之简单后台管理界面示例
- 数据结构课程设计之通讯录管理系统
- 数据结构课设之 景点管理系统
- 数据结构课程设计之图书管理系统
- 数据结构之停车管理系统问题
- 数据结构课设之家谱管理系统
- 日本GMO互联网集团推出比特币薪资管理系统
- 数据结构课程设计——一个简单的停车场管理系统
- Linux系统基础之五:简单的系统文件管理
- 在线进销存管理系统源码 客户关系管理系统源码 人事薪资管理系统源码(PHP+MySQL)
- 数据结构二分排序之学生信息查询简单系统
- exp 根据条件导出示例
- Ant-design-Table
- Part 53 - html.partial 和 html.renderpartial的区别
- T——SQL查询(读书笔记)
- jQuery 遍历 - 过滤
- 数据结构示例之简单薪资管理系统
- spingmvc 文件上传
- 斐波那契数列规律探索
- Eclipse常用快捷键
- ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台
- 摘要篇:zabbix 安装篇
- python _ 冒泡排序
- diff同patch工具
- 机器学习经典算法详解及Python实现–决策树