BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Object Oriented Programming (http://bzupages.com/300-object-oriented-programming/)
-   -   Program to output an integer, a floating point number and a character (http://bzupages.com/f300/program-output-integer-floating-point-number-character-14539/)

bonfire 28-02-2011 10:39 PM

Program to output an integer, a floating point number and a character
 
1 Attachment(s)
C++ Program to output an integer, a floating point number and a character

#include
#include

void main()
{
clrscr();
int x = 10;
float y = 10.1;
char z = 'a';
cout << "x = " << x << endl;
cout << "y = " << y << endl;
cout << "z = " << z << endl;
getch();
}
This program has pre-defined values for an integer x, floating point number y, and a character z.
These three values are outputted using the 'cout' command.

SAMPLE OUTPUT
x = 10
y = 10.1
z = a


All times are GMT +5. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.