This program denostrates the use of the insertion operator with several different types
Source Code:
Result:
Source Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include <iostream.h> #include <conio.h> //using namespace std; int main() { // Statments cout << "24" << endl; // Print an integer. cout << "12.3" << endl; //Print a float. cout << "A" << endl; //Print a character. cout << "Assalam O Alikum!!!" << endl; //print a string. getch(); return 0; } // main |
Result:
24 12.3 A Assalam O Alikum!!!
No comments:
Post a Comment