Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Lavig
Лабораторна робота No8 (Завдання 1)
Lavig
Nov 4th, 2024
156
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.47 KB
| None
|
0
0
raw
download
clone
embed
print
report
#include <iostream>
#include <windows.h>
using
namespace
std
;
int
main
(
)
{
SetConsoleOutputCP
(
1251
)
;
auto
const
n
{
7
}
;
int
x
[
n
]
=
{
-
6
,
12
,
3
,
-
2
,
16
,
5
,
6
}
, i
{
}
;
cout
<<
"Вихідний масив: "
<<
endl
;
for
(
i
;
i
<=
n
-
1
;
i
++
)
{
cout
<<
x
[
i
]
<<
" "
;
}
cout
<<
endl
;
cout
<<
"Перетворений масив:"
<<
endl
;
for
(
i
=
0
;
i
<=
n
-
1
;
i
++
)
{
if
(
x
[
i
]
%
2
!
=
0
)
{
x
[
i
]
=
0
;
}
cout
<<
x
[
i
]
<<
" "
;
}
cout
<<
endl
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
59 min ago | 11.25 KB
Untitled
2 hours ago | 9.75 KB
Untitled
4 hours ago | 13.27 KB
Untitled
6 hours ago | 15.69 KB
Untitled
8 hours ago | 15.44 KB
Untitled
10 hours ago | 16.58 KB
Untitled
12 hours ago | 18.71 KB
JetsMinions Error
13 hours ago | 4.63 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル