1. Write a Program that prints a text of 4 lines consisting of characters, integer values and floating point values using cout statement.


Chapter No: 4

Input & Output

Programming Exercises Solution

Q No 1 : 
Write a Program that prints a text of 4 lines consisting of characters, integer values and floating point values using cout statement.

Solution :


#include<iostream>
#include<conio.h>
void main()
{
    char c='S';
    int i=100;
    float f=3.14;
    cout<<"Welcome to programming!"<<endl;
    cout<<"Character Value: "<<c<<endl;
    cout<<"Integer Value: "<<i<<endl;
    cout<<"Floating Point Value: "<<f<<endl;
    getch();
}



Next Post :
                2: Write a program that inputs the radius of the sphere from the user.
Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News Latest News 

No comments

Powered by Blogger.