ACLC College Computer Programming1 C SESSION8
ACLC College Computer Programming1 C SESSION8
(C++)
Gliceria S. Tan
Instructor
Session 8 Topics
➢ Using cout
➢ Using cin
Output:
First output line.
Second output line.
GLICERIA S. TAN, MIS COMPUTER PROGRAMMING 1
INSTRUCTOR
Below are more examples of the cout statement:
int x = 10, y = 3;
float cost = 10.7;
char ch = ‘A’;
cout<<“Please pay $”<<cost<<“.”;
cout<<“\nThe number is “<<x<<“.”;
cout<<“\nThe sum of “<<x<<“ and “<<y<<“ is “<< x + y;
cout<<“\nYou entered the character “<<ch;