A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

C++ program to demonstrate example of cascading cout and cin
Q:

C++ program to demonstrate example of cascading cout and cin

0

C++ program to demonstrate example of cascading cout and cin

In this program you will learn how to use cascading/ multiple cin and cout in c ++ programming language to print values and messages together.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

cascading cout and cin example in C++.

/*C++ program to demonstrate example of cascading cout & cin.*/
#include  <iostream>
using namespace std;
 
int main()
{
    int a,b;
 
    //without cascading cout
    cout << "Enter value of a and b : ";
 
    //cascading cin
    cin >>a >>b;
 
    //cascading cout
    cout<< "A : " << a << ", B : " << b << endl;
 
    return 0;
}

Output

    Enter value of a and b :10  20
    A : 10, B : 20

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now