#include <iostream>
using namespace std;
void main()
{
for (int x = 1; x <= 100; ++x)
cout << x << endl;
}
using namespace std;
void main()
{
for (int x = 1; x <= 100; ++x)
cout << x << endl;
}
🫡1
في الكود السابق كيف يمكننا تغيير العنصر الأول من هذه المصفوفة إلى 16؟
Anonymous Quiz
21%
A.numbers[1] = 16;
59%
B.numbers[0] = 16;
12%
C.numbers[2] = 16;
8%
D.numbers[3] = 16;
❤1
🫡2
👍2❤1
❤2👎1
👍5
#include <iostream>
using namespace std;
int main() {
string text1 = "C++";
string text2 = "Python";
cout << "Before Swapping:" << endl;
cout << "text1 = " << text1 << endl;
cout << "text2 = " << text2 << endl;
text1.swap(text2);
cout << "\nAfter Swapping:" << endl;
cout << "text1 = " << text1 << endl;
cout << "text2 = " << text2;
return 0;
}
using namespace std;
int main() {
string text1 = "C++";
string text2 = "Python";
cout << "Before Swapping:" << endl;
cout << "text1 = " << text1 << endl;
cout << "text2 = " << text2 << endl;
text1.swap(text2);
cout << "\nAfter Swapping:" << endl;
cout << "text1 = " << text1 << endl;
cout << "text2 = " << text2;
return 0;
}
👍1
يطبع الكود السابق هذا الخرج Before Swapping:
text1 = C++
text2 = Python After Swapping: text1 = Python text2 = C++
text1 = C++
text2 = Python After Swapping: text1 = Python text2 = C++
Anonymous Quiz
51%
صح
49%
خطا
👎3👍2❤1