Algoteka
Log in to submit your own samples!

Read Integer from Console

Problem by oml1111
# Tech tags Title Creator Created date
1 0
2022-05-29 16:19
View all samples for this language (1 verified and 0 unverified)

Using std::cin | C++ |

By oml1111 |
0 likes

Code

#include<iostream>

int main() {
    int a;
    std::cin >> a;
    return 0;
}

Further reading

Guides/Articles

Basic Input/Output - cplusplus.com

References

objects
std::cin en.cppreference.com cplusplus.com
functions
std::basic_istream::operator>> en.cppreference.com cplusplus.com

Problem Description

Read an integer from console. Generally equivalent to reading from standard input.

View sample discussion (0 comments)
View problem discussion (0 comments)