Ce efect are executarea secventei:
x=1;
while (x<=10)
{
if(x%2 ==1) cout <<x;
else cout<<x-1;
x=x+1;
}
Q Instructiuni repetitive C++
Quiz
•
Computers
•
9th - 10th Grade
•
Hard
Laurentiu Lambrinoc
Used 5+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Ce efect are executarea secventei:
x=1;
while (x<=10)
{
if(x%2 ==1) cout <<x;
else cout<<x-1;
x=x+1;
}
Niciun efect, ar genera eroare
1133557799
12345678910
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Scrieti valoarea lui x, dupa executarea secventei:
for(i=1;i<=5;i++)
x=x+1;
5
6
7
8
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Ce efect are executarea secventei ?
a=5;
if(a%5==0); cout<<"Divizibil prin 5";
else cout<<"Nu e divizibil prin 5";
Nu afiseaza nimic, da eroare
Divizibil prin 5
Nu e divizibil prin 5
4.
FILL IN THE BLANK QUESTION
3 mins • 1 pt
Scrieti programul C++ corespunzator algoritmului de mai jos!
citeşte x (număr natural nenul)
cât timp x>0 execută
citeşte y (număr natural)
dacă x>y atunci scrie x%10
altfel scrie y%10
x=y
sfarsit cat timp
5.
FILL IN THE BLANK QUESTION
3 mins • 1 pt
2. Scrieţi ce afişează secventa urmatoare pentru a=5 şi b=17!
…
cin>> a>>b;
if(a<b) {aux=a;a=b;b=aux;}
for(x=a; x>=b;x=x-1)
if( x%2!=0) cout<< x<<’ ’;
10 questions
Kuis Percabangan dan Perulangan
Quiz
•
10th Grade
10 questions
Post Test C++
Quiz
•
9th - 12th Grade
10 questions
Сортировки
Quiz
•
10th Grade
10 questions
Pemrograman Dasar C++
Quiz
•
10th Grade
10 questions
Session 1
Quiz
•
9th - 12th Grade
6 questions
Quiz - Structura liniară
Quiz
•
9th Grade
10 questions
Test Scratch
Quiz
•
5th - 9th Grade
10 questions
Q - Functii Siruri de caractere
Quiz
•
9th - 10th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University