User Profile
Collapse
-
try and paste the code tejas and put in the errors or your problems at the end. -
hey khaichiew85,
so u mean that the "fibfib" func is displaying the series for u?can u help with the calling statement and evrything??
regards
AmyLeave a comment:
-
it doesnt work without else also!!!i tried..so then is that last print statement not a part of the for loop??and is the way i am calling the function right??Leave a comment:
-
#include<stdio. h>
#include<conio. h>
void main()
{
int fib(int);
void fibfib(int);
int n,f=1,ans;
clrscr();
while(f==1)
{
printf("\n***Ge nerating A Fibonacci Series***");
printf("\nEnter Number Of Terms Required: ");
scanf("%d",&n);
if(n<=1)
{
printf("\nInval id Choice..Number Of Terms Should...Leave a comment:
-
But its not printing all the values(or the entire series). Its just printing the final answer.Where should i call this function?in the main block before i am printing my answer?
And most of the times its not printing any thing.Leave a comment:
-
hey donboc...
I am using this function for multiplying 2 natural numbers and if either of the numbers is zero its being handled by the main block...and about (1000*1) and (1000*1)..i have added one else condition for- if a==1 return b.And thanks for mentioning the overflow concept i was having problems with multiplying larger numbers.The solution i see is making the mul function from int to long.
And my actual question was is this...Leave a comment:
-
yes Jos..i executed it..and its working properly..i just wanted to know if now this is proper recursion???
Thank you...
Amy..Leave a comment:
-
#include<stdio. h>
#include<conio. h>
void main()
{
int mul(int,int);
int n1,n2,f=1,ans;
clrscr();
while(f==1)
{
printf("\n***MU LTIPLICATION OF TWO NATURAL NUMBERS***");
printf("\nEnter Two Numbers: ");
scanf("%d %d",&n1,&n2);
if(n1<=0||n2<=0 )
{
printf("\nInval id Choice...");...Leave a comment:
-
I am sorry...but can u please help me understand this...
void fibfib(int n)
{
int q;
if(q=n-1)fibfib(q);pri ntf("%d ",fib(q));
}Leave a comment:
-
so then how do i mk it recursion???i dnt understnd wat u r tryin to explain...m confused..can u explain it by puttin it in d prog??Leave a comment:
-
Multiplication using recursion
...Code:#include<stdio.h> #include<conio.h> void main() { int mul(int,int); int n1,n2,f=1,ans; clrscr(); while(f==1) { printf("\n***MULTIPLICATION OF TWO NATURAL NUMBERS***"); printf("\nEnter Two Numbers: "); scanf("%d %d",&n1,&n2); if(n1<=0||n2<=0) { printf("\nInvalid Choice..."); -
wat=*want...
umm i dint understand the func u hv typed..can u help me with understanding it???it wud b great if u can..
thnx..Leave a comment:
-
plsss help..if u r ready to help lemme knw.. -
Fibonacci with recursion
hey..
can u help me wid this..
#include<stdio. h>
#include<conio. h>
void main()
{
int fib(int);
int n,f=1,ans;
clrscr();
while(f==1)
{
printf("\n***Ge nerating A Fibonacci Series***");
printf("\nEnter Number Of Terms Required: ");
scanf("%d",&n);
if(n<=1)
{
printf("\nInval id Choice..Number... -
hey..
can u help me wid this..
#include<stdio. h>
#include<conio. h>
void main()
{
int fib(int);
int n,f=1,ans;
clrscr();
while(f==1)
{
printf("\n***Ge nerating A Fibonacci Series***");
printf("\nEnter Number Of Terms Required: ");
scanf("%d",&n);
if(n<=1)
{
printf("\nInval id...
No activity results to display
Show More
Leave a comment: