[ create a new paste ] login | about

Link: http://codepad.org/6JNbKINf    [ raw code | output | fork ]

C++, pasted on Mar 3:
//#include<stdio.h>
#include <iostream>
//#include<conio.h>
int main()
{
int num=1234;
int a,b,c,d;
//printf("\n enter number");
//scanf("%d",& num);
a=num/1000;
b=num/100%10;
c=num/10%10;
d=num/1%10;
if ((a==b || a==c) || (b==c || b==c) || (b==d || c==d))
{
printf("\n yes");
}
else
{
printf("\n no");
}
//getch();
return 0;
}


Output:
1
2

 no


Create a new paste based on this one


Comments: