include stdio include stdlib int main void int printf Enter scanf if i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int N,i,j;
printf("Enter N \n");
scanf("%d",&N);
if(N>2)
{
if(N%2==0)
{
printf("2");
for(i=4;i<=N;i+=2)
printf("*%d",i);
}
if(N%2!=0)
{
printf("1");
for(i=3;i<=N;i+=2)
printf("*%d",i);
}
}
else
printf("Error!");
printf("\n");
system("pause");
return 0;
}