@Rahul: What does this print for n = 193?
Dave
On Friday, September 21, 2012 12:14:18 AM UTC-5, Rahul Kumar Patle wrote:
> here is my code:
>
> main()
> {
> int n=13;
> int divisor=1;
> int temp;
> while( divisor < n )
> divisor = 10 * divisor + 1;
> printf("%d\n" , divisor);
> temp = divisor;
> while(n)
> {
> if(temp%n == 0)
> break;
> temp = 10 * (temp % n) + 1;
> divisor = 10 * divisor + 1;
> while( temp < n )
> {
> divisor = 10 * divisor + 1;
> temp = 10 * temp + 1;
> }
> printf("%d and %d\n" , divisor, temp);
> }
> printf("%d\n", divisor);
> }
>
>
>
> On Fri, Sep 21, 2012 at 10:30 AM, Rahul Kumar Patle
> <[email protected]<javascript:>
> > wrote:
>
>> @navin: you have to find a number containing all 1's which is divisible
>> by a given number xx...3, here given number contains 3 at it unit place...
>>
>> On Fri, Sep 21, 2012 at 10:25 AM, Navin Kumar
>> <[email protected]<javascript:>
>> > wrote:
>>
>>> @all: Please explain question number 8. I am not getting the question
>>> exactly what it says ?
>>>
>>> On Fri, Sep 21, 2012 at 9:30 AM, Dave <[email protected] <javascript:>
>>> > wrote:
>>>
>>>> @Bharat: Simulate long division, dividing a number 1111...1 by the
>>>> number. You can do this one digit at a time, printing the quotient digit
>>>> by
>>>> digit until you "bring down" a zero. It could look something like this:
>>>>
>>>> int n=<the number that ends with 3>;
>>>> int divisor=1;
>>>> while( divisor < n )
>>>> divisor = 10 * divisor + 1;
>>>> while( divisor != 0 )
>>>> {
>>>> printf("%d",divisor / n);
>>>> divisor = 10 * (divisor % n) + 1;
>>>> }
>>>> printf("\n");
>>>>
>>>> Dave
>>>>
>>>> On Thursday, September 20, 2012 9:45:55 PM UTC-5, bharat wrote:
>>>>
>>>>> what is the solution(not brute force) for 8th question ?
>>>>>
>>>>> On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> Which edition of barron?
>>>>>>
>>>>>>
>>>>>> On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI <[email protected]> wrote:
>>>>>>
>>>>>>> 1. Java uses stack for byte code in JVM - each instruction is of one
>>>>>>> byte, so how many such instructions are possible in an operating
>>>>>>> system.
>>>>>>>
>>>>>>> 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB,
>>>>>>> 1GB. And each processes is executed as a time sharing fashion. Will
>>>>>>> they be executed on an operating system.
>>>>>>>
>>>>>>> 3. write a recursive program for reversing the linked list.
>>>>>>>
>>>>>>> 4. write a program for checking the given number is a palindrome.
>>>>>>> ( dont use string / array for converting number ).
>>>>>>>
>>>>>>> 5. write a recursive program for multiplying two numbers a and b,
>>>>>>> with
>>>>>>> additions. The program should take care of doing min # additions as
>>>>>>> that of which ever number is lower between a and b.
>>>>>>>
>>>>>>> 6. There are two sets A and B with n integers, write a program to
>>>>>>> check the whether there exists two numbers a in A and b in B such
>>>>>>> that
>>>>>>> a+b = val ( val is given );
>>>>>>>
>>>>>>> 7. write a program to return the row number which has max no of one's
>>>>>>> in an array of NxN matrix where all 1's occur before any 0's starts.
>>>>>>>
>>>>>>> 8. For every number that has 3 in its units place has one multiple
>>>>>>> which has all one's i.e. 111 is such multiple and 13 has a multiple
>>>>>>> 111111. Write a program to find such multiple for any number that has
>>>>>>> 3 at its units place.
>>>>>>>
>>>>>>> 9. what are the maximum no of edges that can be connected in a graph
>>>>>>> of n vertices and 0 edges such that after adding edges given graph is
>>>>>>> still disconnected.
>>>>>>>
>>>>>>> 10. One Question on critical section.
>>>>>>>
>>>>>>> For Analytical Test - Prepare the Questions in the barrons book of
>>>>>>> sample paper - 2 ( they have give two passages )
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Algorithm Geeks" group.
>>>>>>> To post to this group, send email to [email protected].
>>>>>>> To unsubscribe from this group, send email to algogeeks+...@**
>>>>>>> googlegroups.com.
>>>>>>>
>>>>>>> For more options, visit this group at http://groups.google.com/**
>>>>>>> group/algogeeks?hl=en<http://groups.google.com/group/algogeeks?hl=en>
>>>>>>> .
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thanks & regards
>>>>>> Bhupendra
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Algorithm Geeks" group.
>>>>>> To post to this group, send email to [email protected].
>>>>>> To unsubscribe from this group, send email to algogeeks+...@**
>>>>>> googlegroups.com.
>>>>>>
>>>>>> For more options, visit this group at http://groups.google.com/**
>>>>>> group/algogeeks?hl=en<http://groups.google.com/group/algogeeks?hl=en>
>>>>>> .
>>>>>>
>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msg/algogeeks/-/pDBPxDR3R1oJ.
>>>>
>>>> To post to this group, send email to [email protected]<javascript:>
>>>> .
>>>> To unsubscribe from this group, send email to
>>>> [email protected] <javascript:>.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to [email protected]<javascript:>
>>> .
>>> To unsubscribe from this group, send email to
>>> [email protected] <javascript:>.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Thanks and Regards:
>> Rahul Kumar
>> Patle<http://www.linkedin.com/profile/view?id=106245716&trk=tab_pro>
>> M.Tech, School of Information Technology
>> Indian Institute of Technology, Kharagpur-721302,
>> India<http://www.iitkgp.ac.in/>
>> Mobile No: +91-8798049298, +91-9424738542
>> Alternate Email: [email protected] <javascript:>
>>
>>
>
>
> --
> Thanks and Regards:
> Rahul Kumar
> Patle<http://www.linkedin.com/profile/view?id=106245716&trk=tab_pro>
> M.Tech, School of Information Technology
> Indian Institute of Technology, Kharagpur-721302,
> India<http://www.iitkgp.ac.in/>
> Mobile No: +91-8798049298, +91-9424738542
> Alternate Email: [email protected] <javascript:>
>
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/nJx0sndO6dkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.