#include<iostream.h>
main()
{
char selection;
cout<<"menu"<<endl<<"contacts"<<endl<<"messages"<< endl<<"ringer tones"<<endl<<"lastcalls"<<endl;
cin>>selection;
if(selection=='c')
{cout<<"contacts"<<endl<<"call"<<endl<<"insert"<<e ndl<<"remove"<<endl<<"edit"<<endl;
cin>>selection;
if(selection=='c'){cout<<"contacts-call";} else
if(selection=='i'){cout<<"contacts-insert";} else
if(selection=='r'){cout<<"contacts-remove";} else
if(selection=='e'){cout<<"contacts-edit";}} else
if(selection== 'm')
{cout<<"write"<<endl<<"open"<<endl<<"reply"<<endl< <"erase"<<endl;
cin>>selection;
if(selection=='w'){cout<<"messages-write";} else
if(selection=='o'){cout<<"messages-open";} else
if(selection=='r'){cout<<"messages-reply";} else
if(selection=='e'){cout<<"messages-erase";}} else
if(selection=='r')
{cout<<"ringer tones"<<endl<<"melody"<<endl<<"volume"<<endl<<"dis creet"<<endl;
cin>>selection;
if(selection=='m'){cout<<"ringer tones-melody";} else
if(selection=='v'){cout<<"ringertones-volume";} else
if(selection=='d'){cout<<"ringertones-discreet";}} else
if(selection=='l')
{cout<<"last calls"<<endl<<"outgoing"<<endl<<"incoming"<<endl<< "missed"<<endl;
cin>>selection;
if(selection=='o'){cout<<"last calls-outgoing";} else
if(selection=='i'){cout<<"last calls-incoming";} else
if(selection=='m'){cout<<"last calls-missed";}
} }
+ Reply to Thread
Results 1 to 16 of 16
-
-
sorry about posting this program, but i could'nt save it to a floppy in linux so i pasted it here so i could save it with windows...... does anyone see any errors in this program? it's for a project!
-
Besides the fact that it is the worst organized source I've ever seen, it looks like you may have screwed up on your number of brackets, of course, it's really hard to read it the way it's set up.
If you were a parsley farmer, could they garnish your wages? -
Whoops, that was just the formatting messing with me, you need to make main() an int return type like:
int main()If you were a parsley farmer, could they garnish your wages? -
Originally Posted by EaBa
-
WHAT THE HELL IS THIS SHIT!!!
There is always one who is always greater. Never give up. -
i've got a new project:
obile Phone Implementation � PART II
Most mobile phones allow the user to maintain a list of important numbers or numbers dialled regularly or frequently. The list consists of a collection of entries having a name and an associated number. As the phone usually only has digit keys typing the names can be a little tricky. The problem is solved by assigning letters to each of the digit keys. For example, the Siemens C25 phone uses the following assignments
Digit Key Associated Letters
none
1 none
2 ABC
3 DEF
4 GHI
5 JKL
6 MNO
7 PQRS
8 TUV
WXYZ
For example, when a user is entering the name BERTIE they have to press the following keys
2 2 for B
3 3 for E
7 7 7 for R
8 for T
4 4 4 for I
3 3 for E
What is not obvious in this example is the fact that each sequence of presses to determine a letter is separated by a short (usually one second) pause to enable the device identify the letter. The pause is necessary because the keys are overloaded (i.e. each key is associated with more than one letter). For example, without the pause it is impossible to correctly enter the names Simon or Monica as the following sequences show
7777 S 6 M
444 I 666 O
6 M 66 N
666 O 444 I
66 N 222 C
2 A
In both cases the MON sequence requires the entry of 666666 which could be interpreted as OO or MMMMMM or NN or NMO. By introducing a pause at the appropriate point (i.e. 6-666-66 where � represents a one second pause) the user distinguishes the letters and provides the device with the cues necessary to interpret the input correctly.
An alternative would be to have the user press a particular key (e.g. the 1 key which is not associated with any letters) to signal a break in the sequence. Thus, SIMON would be entered as 777714441616661661 and MONICA as 6166616614441222121. For the purposes of this assignment we will adopt the second approach and oblige the user to press the 1 key between each character entered as indicated in the SIMON and MONICA examples above..
Write a program to allow users enter names using the regime described above. Your program should continue to display letters on the screen until the user presses the # key. Thus, the # key will act as a sentinel value for the digit stream.
can anyone help me with this? should i use a "for" loop? i'm stuck! -
This project doesn't seem to make much since..but from what I understood....which it little. The program will mostlikely require a while statement.
-
He is the main character in Dead Alive. The quotes I use are from the movies shown in my Avatar.
-
You're going to want to create a while loop kind of like this:
while(cin >> a)
{
.......
}
And in the while loop, you'll need some if then statements. One condition will be If a==1, then you'll need to go to a function that you will pass an array of length 3(This is the array you will fill with the numbers) to, and the function will determine what letter it is. Another condition will be if (a == #), then you will end the progrm. Then, the last condition you'll just need to do some ascii checking, and determine if they entered a number, then add then add that number to the appropriate part part of the array.
Hope that helps, there are probably better ways, but that's the way I see it.If you were a parsley farmer, could they garnish your wages? -
thanks for the help, but how do i get the program to move across the array?
-
here's what i've done so far:
include<iostream.h>
#include<string.h>
#include<getch.h>
main()
char arr[20][20]={" ","ABC","DEF",
"GHI","JKL"};
int digit=0;
cout<<"please enter a number";
int number=0,lastdigit=0;
getche>>number;
while(number!='#'){if(number==lastdigit){lastdigit ++;}
else
cout<< arr[number][lastdigit];}
cout<< arr[number][lastdigit];
} -
Originally Posted by fmctm1sw
Similar Threads
-
Which wall to project on?
By Haopengyou in forum Newbie / General discussionsReplies: 1Last Post: 22nd Aug 2011, 12:27 -
Project name and path are not taken
By Lehmeier in forum Newbie / General discussionsReplies: 3Last Post: 14th Aug 2011, 10:53 -
LA Metro Project
By budwzr in forum EditingReplies: 0Last Post: 4th Jul 2011, 21:25 -
How to convert DVD project to Blu-Ray project??
By zentsang in forum Authoring (Blu-ray)Replies: 0Last Post: 9th Jul 2010, 17:08 -
Help Neeeded For DVD Project. Extract DVD Menu For Use In Personal Project
By sephiros in forum Authoring (DVD)Replies: 2Last Post: 5th Nov 2008, 12:49