473,909 Members | 6,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Echo print

Sheepman
24 New Member
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 20484
Silent1Mezzo
208 New Member
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
Sheepman
24 New Member
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 Recognized Expert MVP
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 New Member
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
mschenkelberg
44 New Member
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 New Member
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 Recognized Expert MVP
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 New Member
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
4372
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
2396
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 need to see some value. Example i have tables like this echo '<div align="',$align,'"><table border="0" cellpadding="2" cellspacing="0" width="',$largeur,'">'; echo '<tr><td bgcolor="',$titre_bgcolor,'"><font face="',$titre_face,'"...
12
2696
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
3410
by: James Smith | last post by:
What's the difference between Echo and Print? J.
3
2990
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
2189
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 create a new <tr> with another 3, etc. Here is human code: print a <tr> if only 1, 2 or 3 results have been returned, show the results and print a </tr> if 4, 5, and or 6 results have been returned, print <tr> and show
13
23267
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 multiple expressions (as in "echo $string1,$string2,$string3"), which apparently is a bit faster than multiple concatenations. But for basic output, there doesn't seem to be a noticeable difference. The speed test at...
3
1685
by: Stefan Weiss | last post by:
Hi. function printx($str) { echo $str; } true && printx("foo"); true && print("bar");
1
2337
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 but now I am not sure if that makes sense. Can you tell me please ? <html> <head>
0
10035
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9877
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
8097
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7248
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5938
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6138
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.