10_1.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:
C#编程
开发平台:
Visual C++
- //10_1
- #include <iostream.h>
- struct Student{
- int mathmidterm;
- int mathfinal;
- };
- void main()
- {
- Student s;
- cout <<"please input midterm and final mathn"
- <<"grade of a student:n";
- cin >>s.mathmidterm >>s.mathfinal;
- cout <<"the average grade of midterm and final math is "
- <<(s.mathmidterm + s.mathfinal)/2.0 <<endl;
- }