1.
#include
void main()
{
int i;
for(i=1;i<=1000;i++)
if((i%3==0)&&(i%7==0))
printf("%d ",i);
}
2.
#include
void main()
{
char s1[40],char s2[20];
int i=0,j=0;
printf("\n input string1:");
scanf("%s",s1);
printf("\n input string2:");
scanf("%s",s2);
while(s1[i]!='\0')
i++;
while(s2[j]!='\0')
s1[i++]=s2[j++];
s1[i]='\0';
printf("\n New string is :%s",s1);
}
main()
{
int i;
for(i=1;i<=1000;i++)
{
if((i%3==0)||(i%7==0))
printf(%d,i);
}
}