Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ilahma
/
iax0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
aec8f00e
authored
Nov 18, 2018
by
ilahma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
aeef1f62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
TASKS for practise/task3
TASKS for practise/task3
0 → 100644
View file @
aec8f00e
#include <stdio.h>
int main() {
int array[12];
int i;
int j;
float sum=0;
float avg=0;
for(i=0;i<12;i++) {
printf("Please, enter a number:\n");
scanf("%d",&array[i]);
if((array[i]%2)!=0) {
j++;
sum=sum+array[i];
}
}
avg=sum/j;
printf("%f",avg);
return 0;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment