Quick actions

cmd+k|ctrl+k

Navigation

Languages

ls11

Snippet info

Language

Cpp

Visibility

public

Author

zvat.333333

Created

2021-12-18T11:19:50.519564Z

Updated

2021-12-18T11:20:07.086482Z

#include <iostream>

using namespace std;

int main()
{
	setlocale(LC_ALL, "Russian");

	/*
		Индексация начинается с 0.
	*/

	int marks[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; //10, 0-9

	for (int i = 0; i < 10; i++) 
	{
		//cout << marks[i] << endl;
	}


	int x[10];
	
	int xSize = sizeof(x) / sizeof(x[0]);

	for (int i = 0; i < xSize; i++) {
		cout << endl << "Введите число: ";
		cin >> x[i];
	}

	cout << "Вваши значения" << endl;

	for (int i = 0; i < xSize; i++) {
		cout << x[i] << endl;
	}

	cout << "Размер массива: " << xSize << endl;
}

INFO