can u do it for me?

can someone please complete this program i really need it

it has to actually perform when a user selects a option
this is what i have :


#include "stdafx.h"
#include <iostream>


using namespace System;
using namespace std;

void printHistory();
void firstNumbers();
void nthFib():
void quit()


int main()
{

char choice;




do
{
cout << "\n\tmenu\n\n";

cout <<"a.facts about fibonacci numbers\n";

cout << "b.fistr N fibocci number\n";

cout << "c.Nth fibocci number\n";

cout << "d. quit\n";

cout <<"enter the choice: ";

cin >>choice;



cout << " please enter a, b, c, d: ";
cin >> choice;
}
switch (choice);
{
case 'a':
case 'A':
printHistory();
break;
case 'b':
case 'B':
firstNumbers();
break;
case 'c':
case 'C':
nthFib();
break;
case 'd':
case 'D':
quit();
break;

default:
cout << " please enter a, b, c, d\n ";

while(1);
}
return 0;
}

thanks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "stdafx.h"
#include <iostream>


using namespace System;
using namespace std;

void printHistory();
void firstNumbers();
void nthFib():
void quit()


int main()
{

char choice;




do
{
cout << "\n\tmenu\n\n";

cout <<"a.facts about fibonacci numbers\n";

cout << "b.fistr N fibocci number\n";

cout << "c.Nth fibocci number\n";

cout << "d. quit\n";

cout <<"enter the choice: ";

cin >>choice;



cout << " please enter a, b, c, d: ";
cin >> choice;
}
switch (choice);
{
case 'a':
case 'A':
printHistory();
break;
case 'b':
case 'B':
firstNumbers();
break;
case 'c':
case 'C':
nthFib();
break;
case 'd': 
case 'D':
quit();
break;

default:
cout << " please enter a, b, c, d\n ";

while(1);
}
return 0;
}


double check what is in you do-while loop also hint-- line 42
also why are you inputting your choice twice?
Last edited on

i want someone to actually make this functions for me and add to the program above

void printHistory();// this function should display history
void firstNumbers();// this should display the first two fibonacci numbers
void nthFib(): // this should display the nth fibonacci number
void quit() /// and this one should make it exit

no we dont do home work!!! write it yourself and if you have problems then some one will help
1800 posts and counting. ...What, r0shi, you expected it to be an edit after my signature?

kyle11778 is right. We don't do homework, even if you pay us (unless it's a LOT of money). We have a sound reason for this, which we can explain to you if you ask, but we won't do it. If you start the codes and ask us how to continue, or if you write the whole thing out and ask what's wrong with it, then we'll help ya. ;)

-Albatross
Topic archived. No new replies allowed.