what does this mean? scanf("%d",&n);

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions.

A community for students.

what does this mean? scanf("%d",&n);

Computer Science
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

This means that the program will wait for input and take a (d)ecimal and place it in the address of the n variable .
so can u rephrase it in "cin" ?? because scanf means cin right??
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.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

they are similar. scanf is for c and cin is a c++ construct.
yep. but i want it to be just clear. ahmm by just showing "cin and cout". so can u rephrase that into cin ??
im using c++ actually not c. so im really confuse
#include using namespace std; int main() { int n; cin >> n; cout << n << endl; return 0; }
The scanf requires the type to be specified, the cin will display based on the type of variable.
can u show me a code. printing a pyramid ? for example, i type 5. this would be the output: * ** *** **** *****
Pyramid example: #include 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; }
if you use c++ use cin
Scanf is a C standard-library 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.

Not the answer you are looking for?

Search for more explanations.

Ask your own question