Search found 2 matches

by t_sleepy
Thu Oct 03, 2013 9:19 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 41948

Re: 136 Ugly number

Thanks a lot...accepted.. :wink:
by t_sleepy
Tue Oct 01, 2013 1:38 pm
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 41948

Re: 136 Ugly number

The following code is giving me wrong answer. Please tell me what is wrong with the code. :roll:

#include<stdio.h>
#define min(x,y) ((x)<(y)? x:y)
int main()
{
long u[1520];
int i,a=1,b=1,c=1,x,y,z;
u[1]=1;
u[2]=1;
u[3]=1;
for(i=2;i<=1500;i++){
x=2*u[a];
y=3*u ;
z=5*u[c];
u = min (x,min ...

Go to advanced search