Sunday, 22 July 2012

WAP to input a number and display it.

The program code is given below , and its explanation is in "//" (comment section)

#include<iostream.h>         // includes header file
#include<conio.h>
#include<stdio.h>                // input / output library file

void main( )                       //main( ) starts
 {
    int a;                                                                    // declaration of a number
    cout<<"\n\t Input a number";                               //desired output
    cin>>a;                                                                //to input a (variable)
   
    cout<<"\n The number You have Entered is \t";   // display section
    cout<<a;                                                           // displays the value of a
 
   getch( );               //to hold the screen
 }             //main( ) Ends

                // Program Ends

No comments:

Post a Comment

This Blog is not managed by anyone, If you are interested then Contact me avinashkgec@gmail.com

Related Post