Commit 0e3aa671 by ilahma

Delete lab3task2.c

parent a43c6987
Showing with 0 additions and 66 deletions
#include<stdio.h>
int main()
{
int i=0;
int N=0;
int l=0;
int b=1;
int c;
printf("Please enter size of array\n");
scanf("%d", &N);
int array[N];
a[0]=0;
for(i=0;i<N;i++)
{
if(i<2)
a[i]=i;
else
{
c=l+b;
l=b;
b=c;
a[i]=c;
}
printf("%d\n",a[i]);
}
printf("\n");
for(i=0; i<N; i++)
{
if(a[i]%2==1)
{
printf("%d\n",a[i]);
}
}
printf("\n");
for(i=0; i<N; i++)
{
if(a[i]%2==0)
{
printf("%d\n",a[i]);
}}
printf("\n");
for(i=N; i>=0; i--)
{
printf("%d\n",a[i]);
}
printf("\n");
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