Advertisement

C++ 实验一 基础的数据类型与运算操作符

阅读量:

文章结构概览

  • 应用题3
    • 应用题4
    • 应用题5

实践题3解析

问题描述

复制代码
    #include<iostream>
    using namespace std;
    int main (void)
    {
    	int a,c;
    	double b,d,ans = 0;
    	char e;
    	cin >> a >> b >> c >> d >> e;
    	ans = a+b+c+d+e;
    	cout << ans;
    	return 0;
    }
    
    
      
      
      
      
      
      
      
      
      
      
      
      
    

实践题4解析

问题描述

复制代码
    #include<iostream>
    using namespace std;
    int main (void)
    {
    	int x,y;
    	cin >> x >> y;
    	cout << (x*x + x - y) << " " << (2*3.1415926*x + 3.1415926*y*y)

全部评论 (0)

还没有任何评论哟~