当前位置:网站首页>Zzuli:1046 product of odd numbers
Zzuli:1046 product of odd numbers
2022-07-03 14:34:00 【Snake_____】
Title Description
Here you are. n It's an integer , Find the product of all the odd numbers in them .
Input
The first number is n, Indicates that this group of data has n individual , Next is n It's an integer , You can assume that there must be at least one odd number in each set of data .
Output
Output n Product of all odd numbers in the number , Occupy a line .
The sample input Copy
5 2 5 4 6 7
Sample output Copy
35
#include <stdio.h>
int main()
{
int n,i,mul=1,num;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&num);
if(num%2!=0)
{
mul=mul*num;
}
}
printf("%d",mul);
return 0;
}边栏推荐
- protobuf与grpc
- MongoDB数据库入门的常用命令
- 7-20 print 99 formula table (format output)
- 一文了解微分段应用场景与实现机制
- 7-17 crawling worms (break exercise)
- 数学常数表 by q779
- Why is this error reported when modifying records in the database
- Ultra simple mobile map development
- Use of constraintlayout
- How to query the baby category of tmall on Taobao
猜你喜欢
随机推荐
LNMP环境mail函数不能发送邮件解决
JVM garbage collector
tonybot 人形机器人 红外遥控玩法 0630
Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
Common shortcut keys in PCB
Programming language: the essence of type system
ConstraintLayout 的使用
7-14 sum integer segments (C language)
Leetcode (4) -- find the median of two positively ordered arrays
中国PETG市场预测及战略研究报告(2022版)
7-28 monkeys choose King (Joseph problem)
Luogu p4047 [jsoi2010] tribal division solution
Get permissions dynamically
7-2 and then what time (15 minutes)
Plane vector addition
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
洛谷P3065 [USACO12DEC]First! G 题解
SSH访问控制,多次失败登录即封掉IP,防止暴力破解
Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things








![洛谷P4047 [JSOI2010]部落划分 题解](/img/7f/3fab3e94abef3da1f5652db35361df.png)
