08 - cin And cout: Taking Inputs and Accessing The Values (Hindi/Urdu)

How to use cin and cout in C++

In this video, we are going to see how to use cin in C++ and then how to output the input value using cout. This video covers the basics of cin and cout in C++. (PS: Sorry, this video isn't in 4K. But it's not too bad, I hope 🤞)

Series playlist ▶︎ https://youtube.com/playlist?list=PLt4rWC_3rBbWnDrIv4IeC4Vm7PN1wvrNg 

Source Code:

#include <iostream>
using namespace std;

int main(){
    int number = 0;
    float inches = 0.0f;
    char Grade = 'A';

    cout << "Enter your grade: ";
    cin >> Grade; // 12

    cout << "Your grade is " << Grade << endl;

    // cout << "\nHello" << endl;
    
    
    return 0;
}

/* 

The number is {3}
Total inches are {10.4}
Your grade is {B}

*/

Watch The Video:

Post a Comment

0 Comments