نصائح و استشارات برمجية
يعني كلمه مكرره بحذفهم مع بعض
حدد اللي عايزو و بعدين اعمل الاختصارة دي، دا لو بتستخدم برنامج من برامج شركة JetBrains⬇️
alt + shift + ctrl + j
alt + shift + ctrl + j
ياخي أنا أدرس محاسبه مستوى اول.ومعنا ماده الحاسوب اشتي أفهم في الخوارزميات..ولا فهمت حاجه فيها
نصائح و استشارات برمجية
رقم 2
• ابحث عنها في اليوتيوب، اسم الموضوع ⬇️
- flowchart
او
- خرائط التدفق
- flowchart
او
- خرائط التدفق
2. Write a Java program that finds a positive integer n such that the sum of all the integers:
1 + 2 + 3 + …. + n is a number between 100 and 1000000 whose two/ three digits are identical. As output, the program displays the integer n and the corresponding sum. Your program MUST be structured into three methods: The main method and two other methods; one to find the sum from 1 to n, and another to prove that the digits are identical
The following is a sample of a possible run:
run:
The number is 22 and the sum from 1 to 22 is 253
The number is 33 and the sum from 1 to 33 is 561
The number is 44 and the sum from 1 to 44 is 990
The number is 55 and the sum from 1 to 55 is 1540
The number is 66 and the sum from 1 to 66 is 2211
The number is 77 and the sum from 1 to 77 is 3003
The number is 88 and the sum from 1 to 88 is 3916
The number is 99 and the sum from 1 to 99 is 4950
The number is 111 and the sum from 1 to 111 is 6216
The number is 222 and the sum from 1 to 222 is 24753
The number is 333 and the sum from 1 to 333 is 55611
The number is 444 and the sum from 1 to 444 is 98790
BUILD SUCCESSFUL (total time: 0 seconds)
1 + 2 + 3 + …. + n is a number between 100 and 1000000 whose two/ three digits are identical. As output, the program displays the integer n and the corresponding sum. Your program MUST be structured into three methods: The main method and two other methods; one to find the sum from 1 to n, and another to prove that the digits are identical
The following is a sample of a possible run:
run:
The number is 22 and the sum from 1 to 22 is 253
The number is 33 and the sum from 1 to 33 is 561
The number is 44 and the sum from 1 to 44 is 990
The number is 55 and the sum from 1 to 55 is 1540
The number is 66 and the sum from 1 to 66 is 2211
The number is 77 and the sum from 1 to 77 is 3003
The number is 88 and the sum from 1 to 88 is 3916
The number is 99 and the sum from 1 to 99 is 4950
The number is 111 and the sum from 1 to 111 is 6216
The number is 222 and the sum from 1 to 222 is 24753
The number is 333 and the sum from 1 to 333 is 55611
The number is 444 and the sum from 1 to 444 is 98790
BUILD SUCCESSFUL (total time: 0 seconds)
نصائح و استشارات برمجية
2. Write a Java program that finds a positive integer n such that the sum of all the integers: 1 + 2 + 3 + …. + n is a number between 100 and 1000000 whose two/ three digits are identical. As output, the program displays the integer n and the corresponding…
public class SumFinder {
public static void main(String[] args) {
int n = findNumberWithIdenticalDigits();
int sum = calculateSum(n);
System.out.println("The number is " + n + " and the sum from 1 to " + n + " is " + sum);
}
private static int findNumberWithIdenticalDigits() {
int n = 1;
while (true) {
int sum = calculateSum(n);
if (hasIdenticalDigits(sum)) {
return n;
}
n++;
}
}
private static int calculateSum(int n) {
return (n * (n + 1)) / 2;
}
private static boolean hasIdenticalDigits(int number) {
String numberStr = String.valueOf(number);
char digit = numberStr.charAt(0);
for (int i = 1; i < numberStr.length(); i++) {
if (numberStr.charAt(i) != digit) {
return false;
}
}
return true;
}
}
نصائح و استشارات برمجية
عايزة اسم كورس كويس ف ال. python.
شوف الموقع دا ⬇️:
m3md69.github.io/NULLEXIA
فيه دورات تعليمية لناس بتعرف تشرح .. كل اللي عليك انك تروح لقسم التعلم و تختار اللي عايزه .. الناس اللي بتشرح مختارهم بنفسي
m3md69.github.io/NULLEXIA
فيه دورات تعليمية لناس بتعرف تشرح .. كل اللي عليك انك تروح لقسم التعلم و تختار اللي عايزه .. الناس اللي بتشرح مختارهم بنفسي
نصائح و استشارات برمجية
الاولي صح والتانيه تتكتب ازي
• تقدر تكتبي كدا ↓
• او كدا ↓
■ للمعلومة عشان تستخدمي دالة الجذر والتربيع لازم تستدعي مكتبة math ↓
var = sum*sum
• او كدا ↓
var = pow(sum, 2)
■ للمعلومة عشان تستخدمي دالة الجذر والتربيع لازم تستدعي مكتبة math ↓
#include <math.h>
خويه عندي حساب مالت جيميل وهذا الحساب مسويه بجهاز والجهاز عطل وما معي كلفه تصليحه وبقه تقريبا فوك السنه او بالاحرى سنتان اله يله صلحته انه الحساب منعملته اكدته برقم هاتف المهم منفتحت الجهاز لكيته مابيشتغل مع العلم حاولت تشغيله وانه اعرف كل معلوماته يكلي راح يرسل كوكل رساله للرقم الماكد بيه الحساب وماتجي حاولت اكثر من مره حته نقلت الشريحه بغير جهاز هم ماجاي تجي شني السبب وهم منفتحت الجهاز لكيت الواتساب ما جاي يشتغل لان نسخه قديمه حاولت احدثه ماكو فمسحته ونقلت واتساب من جهاز ثاني وفتحته بنفس الرقم الجنت فاتحه بيه ماطلعت المحادثات القديمه اكو امل اكدر ارجع هذه الدردشات لان بيه اشياء مهمه الي اول شي هو استفساري الاول والثاني تبع الواتساب استفساري الثاني اخي العزيز
نصائح و استشارات برمجية
خويه عندي حساب مالت جيميل وهذا الحساب مسويه بجهاز والجهاز عطل وما معي كلفه تصليحه وبقه تقريبا فوك السنه او بالاحرى سنتان اله يله صلحته انه الحساب منعملته اكدته برقم هاتف المهم منفتحت الجهاز لكيته مابيشتغل مع العلم حاولت تشغيله وانه اعرف كل معلوماته يكلي راح…
1. انتظر فترة ممكن اسبوع لانه احتمال يكون عطل في خدمة التاكيد برقم الموبايل تبع جوجل.
2. لو عامل نسخة احتياطية تقدر تسترجعها، اما لو مش عامل نسخة احتياطية مش هتقدر تسترجع اي محادثة.
2. لو عامل نسخة احتياطية تقدر تسترجعها، اما لو مش عامل نسخة احتياطية مش هتقدر تسترجع اي محادثة.
#include <iostream>
using namespace std;
int main()
{
cout << " please answer about this Question to skip " << endl;
cout << "the result 4+5 is : " << endl;
cout << "A) 6\nB) 7\nC)9\nD)0\n" << endl;
enum option {A,B,C,D};
cin>>option;
switch (option)
{
case 'C': cout << "Right! this is great , exland!" << endl;
break;
default : cout << " This is erorr! , the answer is C " << endl;
break;
}
}
وين الخطأ بهاد الكود 💔🙂
+ مابدي استغني عن enum
using namespace std;
int main()
{
cout << " please answer about this Question to skip " << endl;
cout << "the result 4+5 is : " << endl;
cout << "A) 6\nB) 7\nC)9\nD)0\n" << endl;
enum option {A,B,C,D};
cin>>option;
switch (option)
{
case 'C': cout << "Right! this is great , exland!" << endl;
break;
default : cout << " This is erorr! , the answer is C " << endl;
break;
}
}
وين الخطأ بهاد الكود 💔🙂
+ مابدي استغني عن enum
نصائح و استشارات برمجية
#include <iostream> using namespace std; int main() { cout << " please answer about this Question to skip " << endl; cout << "the result 4+5 is : " << endl; cout << "A) 6\nB) 7\nC)9\nD)0\n" << endl; enum option {A,B,C,D}; cin>>option; switch (option) { case…
• تمام، دا التصحيح ↓
#include <iostream>
using namespace std;
enum Option { A, B, C, D };
int main()
{
Option userChoice;
cout << "Please answer this question to skip:" << endl;
cout << "The result of 4+5 is:" << endl;
cout << "A) 6\nB) 7\nC) 9\nD) 0\n" << endl;
char userAnswer;
cin >> userAnswer;
switch (userAnswer)
{
case 'C':
case 'c':
userChoice = C;
cout << "Right! This is great, expand!" << endl;
break;
default:
cout << "This is an error! The correct answer is C." << endl;
break;
}
return 0;
}