Home ยป Updates ยป Learn C++ Tutorial 8

Today we have to discuss about input and output function. By using these function we must declare header file which name iostream.

If You use iostream.h in dev c++ there must be an error during the compilation of the program.

So I suggest you to use #include<iostream> and then using namespace std.

Simple program of Dev c++.

#include<iostream>

using namespace std;

int main(){

cout<<“Hello World”

}

This gives Hello world output IDE.

Now we talk about the input function which means to take the value from the user and display on-screen by using cin function.

Now we discuss a simple program in which takes a number from user and print on the screen by using cin.

 

#include<iostream>

using namespace std;

int main(){

int num;

cout<<“Please Enter the Number”;

cin>>num;

cout<<“You enter :”<<num;

}

Hopefully this tutorial is helpful for your learning process.

Must watch the video to learn more.

Click Here to Watch the Video

 

Download DEV C++ by This Link

 

Spread the love

Related Posts