Size: a a a
PG
J
#include <iostream>
using namespace std;
void main()
{
setlocale(LC_ALL, "Russian");
const int size = 100;
int arr[size];
for (int a = 1; a <= size; a++)
{
arr[a] = a;
cout << arr[a] << '\n';
if (arr[a] / arr[a])
{
cout << "Простое число.\n";
}
else
{
cout << "Не простое число.\n";
}
}
system("pause");
}
C
J
C
4
x=0
Label start: if x <6 then goto CycleBody else goto endcycle
Label CycleBody:
// here Cycle body code
{итератор обозначеный в объвлении цикла. в нашем случае:
x++}
Goto start
Label Endcycle:
i=0;
Label whileCycle:
if i<6 goto whileCycleBody else goto whileCycleEnd;
label whileCycleBody:
{
i++;
}
goto whileCycle;
label whileCycleEnd:
PG
x=0
Label start: if x <6 then goto CycleBody else goto endcycle
Label CycleBody:
// here Cycle body code
{итератор обозначеный в объвлении цикла. в нашем случае:
x++}
Goto start
Label Endcycle:
i=0;
Label whileCycle:
if i<6 goto whileCycleBody else goto whileCycleEnd;
label whileCycleBody:
{
i++;
}
goto whileCycle;
label whileCycleEnd:
C
PG
4
#include <iostream>
using namespace std;
void main()
{
setlocale(LC_ALL, "Russian");
const int size = 100;
int arr[size];
for (int a = 1; a <= size; a++)
{
arr[a] = a;
cout << arr[a] << '\n';
if (arr[a] / arr[a])
{
cout << "Простое число.\n";
}
else
{
cout << "Не простое число.\n";
}
}
system("pause");
}
4
4
C
C
CM
CM
CM
CM