Commit 987bb699 by glkink

Add new file

parent c6c884da
Showing with 26 additions and 0 deletions
#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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment