1 Replies - 889 Views - Last Post: 13 September 2008 - 09:40 AM Rate Topic: -----

#1 csmajor08  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-September 08

Help getting started

Post icon  Posted 13 September 2008 - 09:28 AM

Hey I'm so confused, I'm not looking for someone to write my program out, I just really need help getting started. Here are the directions I recieved...
For this project, design and implement a Visual C++ .NET program that will simulate a simple text messaging system. The only characters that you can send are A to Z and space. A space is represented by sending a single 0. Each character that is entered is separated from the next character by a 1. Two consecutive 0 digits will end the text message. We will not need to enter a 1 after a space (0), since text messages will not have 2 consecutive spaces, except at the end of the message. For example, to send the two-character text message "CS" you would see the input stream "2 2 2 1 7 7 7 7 1 0 0". Your project should read in a sequence of integers that represent the encoding of multi-character text message, and then print out that text message. For this project, you can assume that the input will be legal. A complete message will contain several 1ís plus the appropriate number of the digits 2 through 9 and 0 to create and terminate a message

So far the only thing I have is

#include <iostream>
using namespace std;
int main () {
int variable;
cin >> variable;
int 2=a, 22=b, 222=c, 3=d, 33=e

Should I continue with writting out the number = variable? Have I even started the program right? :crazy:

Is This A Good Question/Topic? 0
  • +

Replies To: Help getting started

#2 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 550
  • View blog
  • Posts: 5,624
  • Joined: 20-March 08

Re: Help getting started

Posted 13 September 2008 - 09:40 AM

Your last statement you provided should be reversed...

int a = 2, b = 22, c = 222, d = 3, e = 33;

// The variables ALWAYS have to be on the left side
// when receiving a value.

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1