# C++ Program to initialize more than one variable at a time

In this Program, You will learn How to initialize more than one variable at a time in C++.

x = y = z = 5

## Example: How to initialize more than one variable at a time in C++

Run it Now
``````#include<iostream>
using namespace std;

int main() {

int x, y, z;

x = y = z = 5;

cout << "\nThe x value is :" << x;
cout << "\nThe y value is :" << y;
cout << "\nThe z value is :" << z;

return 0;
}
``````

#### Output:

``````The x value is :5
The y value is :5
The z value is :5
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.770502,"math_prob":0.99951565,"size":356,"snap":"2020-10-2020-16","text_gpt3_token_len":115,"char_repetition_ratio":0.1875,"word_repetition_ratio":0.04761905,"special_character_ratio":0.41011235,"punctuation_ratio":0.19101124,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9986199,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-17T12:27:17Z\",\"WARC-Record-ID\":\"<urn:uuid:cfbb594d-a793-4093-ab82-4795f4b9fb3e>\",\"Content-Length\":\"35894\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:57aeb907-956c-4805-b16e-70c982ad9578>\",\"WARC-Concurrent-To\":\"<urn:uuid:201b43f4-4164-48f0-8ba5-6ee8fa8210fe>\",\"WARC-IP-Address\":\"142.93.206.191\",\"WARC-Target-URI\":\"https://xiith.com/cpp-program-to-initialize-more-than-one-variable-at-a-time\",\"WARC-Payload-Digest\":\"sha1:KJT6WDK3SWNL6PAD63AA4JQI2VYGGJIP\",\"WARC-Block-Digest\":\"sha1:NPN4QXZCIP3PHJE2A4FDY2FP5LY46N7G\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875142323.84_warc_CC-MAIN-20200217115308-20200217145308-00315.warc.gz\"}"}