Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


please if any one have the solution or idea of solution of Question No 2 of assignment no 4 then please share them i need urgently because today is grace day of that assignment

thanks

 

Views: 140

Attachments:

Replies to This Discussion

cs504 idea solution


Solution 1
#include
using namespace std;
main()
{
char ch;
cout "Type a character in small letter [a-z] :";
cin >> ch;

switch(ch)
{
case 'l':
{
cout"You are a Lucky person";
break;
}
case 'a':
case 'z':
{
cout "You are an extremist (sorry to say)";
break;
}
case 'u':
{
cout"You are Unlucky, wish you good luck.";
break;
}
default:
{
cout"You are Unpredictable person";
break;
}
}
system("pause");
}



Solution 2
#include
using namespace std;
void Fibonacci(int,int,int,int);
main()
{
unsigned int i=0,j=0,sum=1,num;

cout "Enter the limit for the series ";

cin >> num;
Fibonacci(num,i,j,sum);
system("pause");
}
void Fibonacci(int num,int i,int j,int sum)
{
cout sum endl;
i = j;
j = sum;
sum = i + j;

if (sum < num)
Fibonacci(num,i,j,sum);

}

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service