Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
glkink
/
C-programming
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
987bb699
authored
Jan 23, 2022
by
glkink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
c6c884da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
paarispaaritu
paarispaaritu
0 → 100644
View file @
987bb699
#include <stdio.h>
int main()
{
int arr[100],i,num;
printf("Sisestage massiivi suurus\n");
scanf("%d",&num);//loeb massiivi suuruse jaoks kasutaja sisendit
printf("Sisestage massiivi elemendid\n");
for(i=0; i<num; i++){
scanf("%d",&arr[i]);//loeb massiivi elementide kasutaja sisendit
}
printf("\nMassiivi paarisarvud on \n");
for(i=0; i<num; i++){
if(arr[i]%2==0){
printf("%d \t",arr[i]);
}
}
printf("\nMassiivi paaritud arvud on \n");
for(i=0; i<=num; i++){
if (arr[i]%2==1){
printf("%d \t",arr[i]);
}
}
return 0;
}
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