bhaktanishant's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 15 (0.07 per day)
- Joined:
- 19-November 12
- Profile Views:
- 799
- Last Active:
Dec 13 2012 05:08 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: confusion in recursion
Posted 13 Dec 2012
Thank you adak and CY5 now i get recursion.
adak your method to put 'printf' before break; to see how break; works is very good. it help me to understand how is function working.
CY5 by applying 'printf' before break; it was clear that how is break; working but was not clear that how the output 2,2,3 was printed without break;. but you elaborate it to me that how code printing output without break;.
THANKS... -
In Topic: wrong output to find prime factor of number
Posted 12 Dec 2012
{ printf("\n%d",i); v=v/i; i=1; }
by change i=1; get true result. -
In Topic: wrong output to find prime factor of number
Posted 12 Dec 2012
raghav.naganathan, on 12 December 2012 - 09:06 PM, said:You can use a while loop instead if you just want to keep i as it is.
while(i<=v) { if (v%i==0) { printf("\n%d",i); v=v/i; } i++; }
regards,
Raghav
By your code 'i'will continuously increase by 1. but i want to reset 'i' to 2.
because for every v=v/i;, i should must start division from 2. -
In Topic: wrong output to find prime factor of number
Posted 12 Dec 2012
I think 'i' is not resetting at 2 in 'if' command but why? -
In Topic: no idea for a simple c code
Posted 2 Dec 2012
thank u "Skydiver" "macosxnerd101" and "snoopy11", you guys help me alot....
THANKS
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
bhaktanishant has no profile comments yet. Why not say hello?