山东智趣岛论坛

 找回密码
 立即注册
查看: 2964|回复: 0
打印 上一主题 下一主题

1007:计算(a+b)×c的值

[复制链接]

10

主题

12

帖子

127

积分

版主

Rank: 7Rank: 7Rank: 7

积分
127
跳转到指定楼层
楼主
发表于 2023-10-18 21:01:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式 来自 山东淄博
【题目描述】

给定3<span class="MathJax" id="MathJax-Element-1-Frame" tabindex="0" data-mathml="3" role="presentation" style="display: inline; line-height: normal; font-size: 16px; text-indent: 0px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">

[C++] 纯文本查看 复制代码
#include<iostream>
using namespace std;
int main(){
	int a;
	int b;
	int c;
	int d;
	cin>>a>>b>>c;
	d=(a+b)*c;
	cout<<d;
}
333
个整数<span class="MathJax" id="MathJax-Element-2-Frame" tabindex="0" data-mathml="a、b、c" role="presentation" style="font-family: &quot;Microsoft YaHei&quot;; display: inline; line-height: normal; font-size: 16px; text-indent: 0px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">a、b、c
计算表达式<span class="MathJax" id="MathJax-Element-3-Frame" tabindex="0" data-mathml="(a+b)&#xD7;c" role="presentation" style="font-family: &quot;Microsoft YaHei&quot;; display: inline; line-height: normal; font-size: 16px; text-indent: 0px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(a+b)×c(的值。


【输入】

输入仅一行,包括三个整数<span class="MathJax" id="MathJax-Element-4-Frame" tabindex="0" data-mathml="a、b、c" role="presentation" style="display: inline; line-height: normal; font-size: 16px; text-indent: 0px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">a、b、c
数与数之间以一个空格分开。<span class="MathJax" id="MathJax-Element-5-Frame" tabindex="0" data-mathml="(-10,000&lt;a,b,c&lt;10,000)" role="presentation" style="display: inline; line-height: normal; font-size: 16px; text-indent: 0px; word-spacing: normal; overflow-wrap: normal; text-wrap: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; position: relative;">(-10,000<a,b,c<10,000)


【输出】

输出一行,即表达式的值。


【输入样例】2 3 5【输出样例】25
回复

使用道具 举报

QQ|山东智趣岛论坛 ( 鲁ICP备2023024048号 )

GMT+8, 2025-3-1 07:09 , Processed in 0.211545 second(s), 35 queries .

Powered by Discuz! X3.3 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表