formatting source-code for 153fb7b8a5

This commit is contained in:
github-actions
2020-05-30 04:02:09 +00:00
parent 92fe9495ec
commit 8a2de9842b
175 changed files with 1671 additions and 3460 deletions

View File

@@ -1,7 +1,6 @@
#include <iostream>
using namespace std;
int main()
{
int main() {
int n, k;
cout << "Enter size of array=\t";
cin >> n;
@@ -9,29 +8,22 @@ int main()
cin >> k;
int a[n];
cout << "Enter elements of array=\t";
for (int i = 0; i < n; i++)
{
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int temp = 0;
for (int i = 0; i < k; i++)
{
for (int i = 0; i < k; i++) {
temp = a[0];
for (int j = 0; j < n; j++)
{
if (j == n - 1)
{
for (int j = 0; j < n; j++) {
if (j == n - 1) {
a[n - 1] = temp;
}
else
{
} else {
a[j] = a[j + 1];
}
}
}
cout << "Your rotated array is=\t";
for (int j = 0; j < n; j++)
{
for (int j = 0; j < n; j++) {
cout << a[j] << " ";
}
getchar();