初学C++实验报告题目及答案.docVIP

  • 36
  • 0
  • 约2.54万字
  • 约 40页
  • 2017-06-25 发布于河南
  • 举报
初学C实验报告题目及答案

计算机程序设计与问题求解 (C++) 实验报告 班 级 **00360* 学 号 **00360*** 姓 名 路边葱子 指导教师 二O一二年三月 实验一 1.将双撇号中的内容修改为汉字输出。 2.将计算改为乘和除运算(*,/),重点掌握整除取值规律 3.实现三个数排序,用不同顺序和不同类型的数输入,测试程序的正确性。 程序代码: 1、 #include iostream.h int main() { cout 这 是; cout 一个 C++; cout 程序 endl; return 0; } 2、乘法 #include iostream.h void main() { int a,b,c; coutinput a和b两个整数的值:; cinab; c=a*b; couta*b=a*bendl; couta*b=cendl; } 除法 #include iostream.h void main() { int a,b,c; coutinput a和b两个整数的值:; cinab; c=a/b; couta/b=a/bendl; couta/b=cendl; } 3、 #include

文档评论(0)

1亿VIP精品文档

相关文档