473,385 Members | 1,311 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Echo print

Sheepman
I'm in my first C++ class. I am supposed to have the program I'm writing "echo print" to the screen. What does that mean, I can't find any reference to it in my book.
Jun 22 '07 #1
8 20395
Silent1Mezzo
208 100+
I'm in my first C++ class. I am supposed to have the program I'm writing "echo print" to the screen. What does that mean, I can't find any reference to it in my book.
Well my guess is that they're talking about the echo command.
An example of this would be: echo hello
On the screen you would see the words "hello"

I think they want you to write a program that uses this command and prints something onto the screen.

If this is so research the system() command.
Jun 22 '07 #2
Here's how the question is stated.

Write a complete C++ program...Ask the user to enter integers. Echo print each integer to the screen. If the interger...

I can make the program do whats ask with the integers. I'm just not sure about the bold statement.

Thanks for the quick response!
Jun 22 '07 #3
JosAH
11,448 Expert 8TB
Here's how the question is stated.

Write a complete C++ program...Ask the user to enter integers. Echo print each integer to the screen. If the interger...

I can make the program do whats ask with the integers. I'm just not sure about the bold statement.

Thanks for the quick response!
I guess your program is supposed to print (echo) what the user had entered;
e.g. if the user entered 4 5 6 the program is supposed to echo (print) 4 5 6 again.

kind regards,

Jos
Jun 22 '07 #4
Silent1Mezzo
208 100+
Here's how the question is stated.

Write a complete C++ program...Ask the user to enter integers. Echo print each integer to the screen. If the interger...

I can make the program do whats ask with the integers. I'm just not sure about the bold statement.

Thanks for the quick response!
Ok so yes. echo is a system statement that prints whatever's after it.

Basically you'll want to get the numbers from the user. Then uses the system() and echo command to print it.
Jun 22 '07 #5
I don't think they necessarily mean to use the system echo command , but to just print out the same integers the user entered in the same order, probably using std::out , since you will be using std::in to input the ints
Jun 22 '07 #6
Silent1Mezzo
208 100+
I don't think they necessarily mean to use the system echo command , but to just print out the same integers the user entered in the same order, probably using std::out , since you will be using std::in to input the ints

If they didn't mean to use the sys echo command then why did they say "Echo print each integer"? That to me sounds like it is the echo command
Jun 22 '07 #7
JosAH
11,448 Expert 8TB
If they didn't mean to use the sys echo command then why did they say "Echo print each integer"? That to me sounds like it is the echo command
My guess is that the verbs 'echo' and 'print' are used as synonyms here. Two
synonyms next to each other are confusing.

kind regards,

Jos
Jun 23 '07 #8
niskin
109 100+
I don't know if they want this, but I would do this:
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     char numbers[10];
  7.     cout<<"Enter a number: ";
  8.     cin.getline(numbers, 10);
  9.     cout<<"The number you entered was: " << numbers;
  10.     cin.get();
  11. }
  12.  
Jun 23 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ricki Susic | last post by:
Hi, Can anyone help me to get my query printed when I parse ID. Here is the code: FILE: udskriv.php <?php
6
by: Marco | last post by:
I have a couple pages that have tables, whats best use echo to produce the full table with the variables or is it best to just make the table in plain html and use <?php echo ('$va'l); ?> when i...
12
by: mark | last post by:
I'm trying to do something like this: <?php foreach($apples as $key => $value){ print("<td class=<?php if ($myvar==$key){print (class1);} else {print (class2);} ?>>$value</td>"); } ?>
6
by: James Smith | last post by:
What's the difference between Echo and Print? J.
3
by: Alex Shi | last post by:
Hi all, Please take a look at following very simple script; #!/usr/bin/php -q <? echo "Hello, world!\n"; if (!$tty) { $tty = fopen('php://stdin', 'r'); }
4
by: Aaron Reimann | last post by:
I am trying to build a table using results from a database query. Right now (code below), the code displays each result in a new <tr>. I am wanted to display 3 results in one <tr> </tr>, and then...
13
by: Tony | last post by:
I'm just wondering why it seems most people use "echo" instead of "print". I tend to use "print", probably because I started programming in BASIC back in 78, so it's just familiar. Echo can take...
3
by: Stefan Weiss | last post by:
Hi. function printx($str) { echo $str; } true && printx("foo"); true && print("bar");
1
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.