当前位置:网站首页>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;
}
边栏推荐
- Etcd cluster permission management and account password usage
- Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
- Output student grades
- 编程语言:类型系统的本质
- 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
- 添加Zabbix计算类型项目Calculated items
- 论文分享:Generating Playful Palettes from Images
- Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
- Sub GHz wireless solution Z-Wave 800 Series zg23 SOC and zgm230s modules
- Detailed explanation of four modes of distributed transaction (Seata)
猜你喜欢
Tonybot humanoid robot checks the port and corresponds to port 0701
Puzzle (016.3) is inextricably linked
Doris学习笔记之数据表的创建
Paper sharing: generating playful palettes from images
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
Showmebug entered Tencent conference, opening the era of professional technical interview
洛谷P4047 [JSOI2010]部落划分 题解
Detailed explanation of four modes of distributed transaction (Seata)
随机推荐
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
Sub-GHz无线解决方案Z-Wave 800 系列ZG23 soc和ZGM230S模块
洛谷P3065 [USACO12DEC]First! G 题解
Ultra simple mobile map development
556. 下一个更大元素 III : 简单构造模拟题
Thread. Sleep and timeunit SECONDS. The difference between sleep
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
C language,%d% Difference between 2D%2d%02d
tonybot 人形机器人 首次开机 0630
编程语言:类型系统的本质
Tonybot humanoid robot infrared remote control play 0630
etcd集群权限管理和账号密码使用
基因家族特征分析 - 染色体定位分析
Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
光猫超级账号密码、宽带账号密码 获取
Jiuyi cloud black free encryption free version source code
Zhonggan micro sprint technology innovation board: annual revenue of 240million, net loss of 17.82 million, proposed to raise 600million