当前位置:网站首页>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;
}
边栏推荐
- Strategy, tactics (and OKR)
- DDK for XP
- x86汇编语言-从实模式到保护模式 笔记
- X86 assembly language - Notes from real mode to protected mode
- 【7.3】146. LRU caching mechanism
- 556. The next larger element III
- GRPC的四种数据流以及案例
- Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
- Creation of data table of Doris' learning notes
- 一文了解微分段应用场景与实现机制
猜你喜欢
Tonybot humanoid robot starts for the first time 0630
GRPC的四种数据流以及案例
Adc128s022 ADC Verilog design and Implementation
Puzzle (016.4) domino effect
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
Mysql多表查询 #子查询
tonybot 人形机器人 红外遥控玩法 0630
7-15 calculation of PI
MySQL multi table query subquery
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
随机推荐
中国PETG市场预测及战略研究报告(2022版)
Find specified characters
添加Zabbix计算类型项目Calculated items
7-19 check denomination (solve binary linear equation)
Tonybot humanoid robot starts for the first time 0630
MongoDB数据库入门的常用命令
ShowMeBug入驻腾讯会议,开启专业级技术面试时代
牛客网:过河卒
puzzle(016.3)千丝万缕
天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
retrofit
Table of mathematical constants by q779
Paper sharing: generating playful palettes from images
Showmebug entered Tencent conference, opening the era of professional technical interview
Understand the application scenario and implementation mechanism of differential segment
全文检索引擎Solr系列—–全文检索基本原理
Common shortcut keys in PCB
Tonybot humanoid robot checks the port and corresponds to port 0701
Leetcode(4)——尋找兩個正序數組的中比特數
pyQt界面制作(登录+跳转页面)