当前位置:网站首页>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;
}
边栏推荐
- Paper sharing: generating playful palettes from images
- 7-15 calculation of PI
- ZABBIX saves the page blank after adding calculated items
- 【7.3】146. LRU缓存机制
- 556. 下一个更大元素 III
- Recent learning summary
- Puzzle (016.3) is inextricably linked
- X86 assembly language - Notes from real mode to protected mode
- 论文分享:Generating Playful Palettes from Images
- Sendmail无法发送邮件及发送过慢解决
猜你喜欢
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
Puzzle (016.4) domino effect
Polestar美股上市:5.5万台交付如何支持得起超200亿美元估值
Four data flows and cases of grpc
Doris学习笔记之数据表的创建
Adc128s022 ADC Verilog design and Implementation
dllexport和dllimport
Tonybot Humanoïde Robot Infrared Remote play 0630
puzzle(016.3)千丝万缕
Tonybot humanoid robot infrared remote control play 0630
随机推荐
X86 assembly language - Notes from real mode to protected mode
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution
Find specified characters
Recent learning summary
retrofit
NPM install is stuck with various strange errors of node NPY
Sendmail无法发送邮件及发送过慢解决
MongoDB索引
Tonybot humanoid robot starts for the first time 0630
中国PETG市场预测及战略研究报告(2022版)
Output student grades
7-14 sum integer segments (C language)
添加Zabbix计算类型项目Calculated items
FPGA blocking assignment and non blocking assignment
别再问自己适不适合做软件测试了
Protobuf and grpc
表单文本框的使用(一) 选择文本
Get permissions dynamically
Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not