Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing

This Question is Closed

ecdown Group TitleBest ResponseYou've already chosen the best response.3
This means that the program will wait for input and take a (d)ecimal and place it in the address of the n variable .
 2 years ago

alfers101 Group TitleBest ResponseYou've already chosen the best response.0
so can u rephrase it in "cin" ?? because scanf means cin right??
 2 years ago

DBhatta Group TitleBest ResponseYou've already chosen the best response.0
It means it will prompt the user to input a integer number and store its value in 'n'. %d signifies that the data type of input should be an integer. & signifies that it is stored in a particular address.
 2 years ago

ecdown Group TitleBest ResponseYou've already chosen the best response.3
they are similar. scanf is for c and cin is a c++ construct.
 2 years ago

alfers101 Group TitleBest ResponseYou've already chosen the best response.0
yep. but i want it to be just clear. ahmm by just showing "cin and cout". so can u rephrase that into cin ??
 2 years ago

alfers101 Group TitleBest ResponseYou've already chosen the best response.0
im using c++ actually not c. so im really confuse
 2 years ago

ecdown Group TitleBest ResponseYou've already chosen the best response.3
#include <iostream> using namespace std; int main() { int n; cin >> n; cout << n << endl; return 0; }
 2 years ago

ecdown Group TitleBest ResponseYou've already chosen the best response.3
The scanf requires the type to be specified, the cin will display based on the type of variable.
 2 years ago

alfers101 Group TitleBest ResponseYou've already chosen the best response.0
can u show me a code. printing a pyramid ? for example, i type 5. this would be the output: * ** *** **** *****
 2 years ago

ecdown Group TitleBest ResponseYou've already chosen the best response.3
Pyramid example: #include <iostream> using namespace std; int main() { int count; cin >> count; for(int i = 1; i <= count ; i++) { for (int j = 1; j <= i; j++) { cout << "*" ; } cout << endl; } return 0; }
 2 years ago

Tomas.A Group TitleBest ResponseYou've already chosen the best response.0
if you use c++ use cin
 2 years ago

llib_xoc Group TitleBest ResponseYou've already chosen the best response.0
Scanf is a C standardlibrary function which reads data from the stdin channel, decodes it according to the format string (argument 1), and stores it in the variable that argument two points to. Lots more info at http://dinkum.com/manuals/?manual=compleat&page=lib_scan.html#Scan%20Functions.
 2 years ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.