Can someone find the problem? This is a simple C program. It is supposed to print 11, 12, 13 but it does not. Why? Thanks!
#include<stdio.h>
#include<conio.h>
void main()
{
int no[4]={11,12,13,14}; /* An array containing 4 numbers */
int num[4];
int count=0;
int p;
int s=1;
char c='y';
for(int j=0;j<=3;j++)
{
p=no[j];
for(int n=s;n<=3;n++)
{
if(p!=no[n]) c='n'; /* If not equal*/
}
if(c=='n')
{
num[count]=p;
s=s+1;
count=count+1;
}
}
printf("%d %d %d",num[2],num[1],num[3]);
getche();
}