Answers for "input and output in c++"

C++
2

input output c++

#include <iostream>
int main() {
  int year; //variable created as a integer
  std::cin >> year;//It takes input from the user
  std::cout << "Year: " << year; //It prints output on the screen
}
Posted by: Guest on August-17-2021
0

c++ output

#include <iostream>

int main(){
  std::cout << "Hello World!" << std::endl; // prints "Hello World"
}
Posted by: Guest on October-07-2020

Code answers related to "input and output in c++"

Browse Popular Code Answers by Language