![]() |
|
![]() |
![]() |
|
~//.. يوميات عضو/هـ :: تجرد ذوآتهم بصمت .. كل ما يحدث من مواقف.. وطرائف.. وتجارب.. وما يجول بخواطرهم :: |
![]() |
![]() |
#1881 |
![]() ![]() ![]() |
![]()
هههههههه بصراحه ادري انك محتاسه وموفاهمه شيبس هالشرح لـ الفيجول بيسك لو عرفتيه عناه انك تعرفي في لغة السي انا طريقه كتابتي للبروجكت تختلف اختلاف كلي
نبدا بسم الله #include using namespace std; int main( ) {int x,c,r; cin>> x,c; r=x+c; cout<< r; return 0; } {int x,c,r; <<<< هاذي يعني ان عندنا 3 متغيرات طبعا اي عمليه جمع او قسمه او ضرب عددين مع بعض والناتج هو العدد الثالث زي مثلا نرمز للعدد x )9 ) ونرمز للعدد 5 (c) ونرمز للناتج ( r ) تمام cin>> x,c; <<< هاذي ياقلبي معناته زي اقرا او ادخل وهنا يجيك لما تبدا بتشغيل البرنامج تدخل الـ اكس والسي r=x+c; <<<< هاذي ياقلبي المعادله ونقدر للطرح نستخدم ( - ) وللضرب ( * ) وللقسمه ( / ) بدل عمليه الجمع حلوين للحين cout<< r; <<< هنا تخرج قيمه الـ r وعلي حسب العمليه تقدر تغير زي ماتبي اذا تبيها جمع خليتها جمع اذا تبيها طرح خليتها طرح علـ العموم مافيه احسن من السهل المبسط انا هذا مجرد رأيي وهاذي اسهل طريقه للكتابه للبرامج اللي تبيها |
![]() ![]() ![]() |
![]() |
#1882 |
![]() ![]() ![]() |
![]()
هذآ حل السؤال الأول
بسم الله أبدأ #include <iostream.h> #include <stdio.h> int main() { int n, i=1; cin>>n; while(n>i) { cout<<i<<endl; i+=2; } g***har(); return 0; } وهذا حل السؤال 1-2 #include <iostream.h> #include <stdio.h> int main() { int n, m; cin>>n>>m; if(n%2==0){ n++; } while(m>n) { cout<<n<<endl; n+=2; } g***har(); return 0; } |
![]() |
![]() |
#1883 |
![]() ![]() ![]() |
![]()
الكلمه اللي ما طلعت عشان حماية المنتدى
![]() هي كذا g e t c h a r حاولي تزبطينها عاد لي باك اكيد |
![]() |
![]() |
#1884 |
![]() ![]() ![]() |
![]()
حل السؤال 2 كالتالي
#include <iostream.h> #include <stdio.h> int main() { int n, m , sum=0 ,average, count=0; cin>>n>>m; while(m>n) { sum=sum+n; count++; n++; } average=sum/count; cout<<" the sum is ="<<sum<<"the average is ="<<average; g***har(); return 0; } |
![]() |
![]() |
#1885 |
![]() ![]() ![]() |
![]()
وهذا يا سيدتي حل السؤال الثالث
#include <iostream.h> #include <stdio.h> int main() { float c=2 ,o=0 ,n=0 ; while(c<=1000) { n=n+1/c; c++; } cout<<" value = "<<n; g***har(); return 0; } |
![]() |
![]() |
#1886 |
![]() ![]() ![]() |
![]()
وحل السؤال الرابع والخامس من دفتري العزيز
#include<iostream.h> #include<stdio.h> main() { int x,max1,max2,i=2; cout<<" Enter Number 1 = "; cin>>x; max1=x; max2=x; while(i<=5) { cout<<" Enter Number "<<i<<" = "; cin>>x; if (x>max1) { max2=max1; max1=x; } else if (x<max1) { if(x>max2||max1==max2) { max2=x; } } i++; } cout<<" The First Largest = "<<max1<<endl; cout<<" The Second Largest = "<<max2; g***har(); } والخامس كالتالي #include <iostream.h> #include <stdio.h> int main() { int input , s , m , h; cin>>input; h=input/3600; m=input%3600/60; s=input%60; cout<<"hours is= "<<h<<endl; cout<<"minutes is= "<<m<<endl; cout<<"seconds is= "<<s<<endl; g***har(); return 0; } ولي باك ![]() |
![]() |
![]() |
#1887 |
![]() ![]() ![]() |
![]()
حل السؤال السادس من النت يالغاليه
#include <iostream.h> #include <stdio.h> int main() { int i,j ,f; char op; cin>>i>>op>>j; switch(op) { case '+':cout<<i+j; break; case '-':cout<<i-j; break; case '*':cout<<i*j; break; case '/':cout<<i/j; break; case '%':cout<<int(i)%(int)j; break; } g***har(); return 0; } وكذالك السابع #include <iostream.h> #include <stdio.h> int main() { char a[100] ; int i ,g , d=0; gets(a); for(i=0;i<strlen(a);i++){ cout<<a[i]; d=0; for(g=0;g<strlen(a);g++){ if(a[i]==a[g]){ d++; }} cout<<d; cout<<"\n"; } g***har(); return 0; } وهذا من الدفتر *^ حل السؤال الثامن #include <iostream.h> #include <stdio.h> int main() { char a[100] ; int i ,g , d , s=0 ,x; gets(a); for(i=0;i<strlen(a);i++){ cout<<a[i]; d=0; for(g=0;g<strlen(a);g++){ if(a[i]==a[g]){ d++; } if(s<d){ s=d; x=i;} } cout<<d; cout<<"\n"; } cout<<"\n\n highest frequency letter "<<a[x]; g***har(); return 0; } راجعت هالبرنامج مرتين بصراحه ماعرفت وش فيه خطأ يطلع لي خطأ واحد خخخخ وعندي احساس انه نقس سيمي كولون عاد اتصرفي معاه اني - |
![]() |
![]() |
#1888 |
![]() ![]() ![]() |
![]()
حل سؤال input 500 numbers in array ; find the highest occurrence of x
#include <iostream.h> #include <stdio.h> int main() { int a[500] ; int c ,o , u , n ,t ,x; for(c=0;c<500;c++){ cin>>a[c];} cout<<" Enter number to find "; cin>>x; for(o=499;o>=0;o--){ if(a[o]==x){ n=o; } } cout<<" the highest occurrence is "<<n; g***har(); return 0; } + حل سؤال input 100 numbers in array ;transpose the array I,e make the last element the first and the first element the last . #include <iostream.h> #include <stdio.h> int main() { int a[100] ; int i , d , g ,t , r; for(i=0;i<100;i++){ cin>>a[i];} for(t=99,d=0;d<50;d++,t--){ r=a[d]; a[d]=a[t]; a[t]=r; } for(g=0;g<100;g++){ cout<<endl<<a[g];} g***har(); return 0; } حل السؤال العاشر اممم بصراحه مالقيت له حل ولا اعرف احله عشان ما توهق معك ![]() وهذا حل السؤال 12 اللي هو sort an array of 100 numbers . الحل كالتالي #include <iostream.h> #include <stdio.h> int main() { int a[100] ; int i ,j , d , temp ; // this section for input## cout<<" Enter 100 numbers \n"; for(i=0;i<100;i++){ cin>>a[i]; } // this section for sort array## for(j=0;j<100;j++){ for(d=j+1;d<100;d++){ if(a[j]<a[d]){ temp=a[j]; a[j]=a[d]; a[d]=temp; }}} // this section for come out## cout<<"\n the sort by largest is \n"; for(j=0;j<100;j++){ cout<<a[j]<<endl; } g***har(); return 0; } |
![]() |
![]() |
#1889 |
![]() ![]() ![]() |
![]()
على فكره انتي آخر شي حاطه سؤالين
يعني 13 و 14 مو 13 سؤال بس ![]() هيا ركزي شوي سؤال 13 اللي هو input an array of 100 numbers ;find the number of times a number x has occurred in the array . حله كذا #include <iostream.h> #include <stdio.h> int main() { int a[100] ; int i ,j , d , x, count=0 ; // this section for input## cout<<" Enter 100 numbers \n"; for(i=0;i<100;i++){ cin>>a[i]; } // this section for find occured## cout<<"\n Enter number to find occured\n"; cin>>x; for(d=0;d<100;d++){ if(x==a[d]){ count++; } } cout<<" occured "<<x<<" is = "<<count; g***har(); return 0; } وحل سؤال 14 الي هو input 100 numbers in an array; put all odd number in a new array and even number in another new array. وحله كذا #include <iostream.h> #include <stdio.h> int main() { int a[100] , odd[100] ,even[100] ; int i ,j , d , w=0 , f , g=0 ; // this section for input## cout<<" Enter 100 numbers \n"; for(i=0;i<100;i++){ cin>>a[i]; } // this section for sort array## for(w=0,i=0,j=0;j<100;j++){ if(a[j]%2==0){ even[w]=a[j]; w++;} else { odd[g]=a[j]; g++;} } // this section for come out even numbers## cout<<"\n the even numbers is \n"; for(i=0;i<w;i++){ cout<<endl<<even[i]; } // this section for come out odd numbers## cout<<"\n the odd numbers is \n"; for(f=0;f<g;f++){ cout<<endl<<odd[f]; } g***har(); return 0; } وآنا آسف لو حصل مني تقصير او وبجد اعتذر عن عدم حلي للسؤال العشر لكني ونا خوك ما ودي احله لك بالغلط .. حليته طلع عندي 7 اخطاء ولا اعرف وش هي ولا حبيت احله لك خطأ . ولو احتجتي اي شي انا موجود وحياك الله . |
![]() |
![]() |
#1890 |
![]() ![]() ![]() |
![]()
مشششششششششكووووووووووووووووووووووووور
مشكووووووووووووووور مشكوووووووووور والله يسعدك ويخليك ويعطيك الف صحه وعافيه ويسهل عليك يارب ما كان عسير والله انك فرجت عني هم لايعلم فيه الا رب العباد ولا حصل قصور انا بجد مدري وش اقول لك لكن الله يجزيك بالخير ويحقق امانيك ويطول بعمرك شكرا لك يا احمد الف شكر |
![]() |
![]() |
مواقع النشر (المفضلة) |
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
|
![]() |
||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
ا مبراطور الشوق" رهين الشوق"يعانق ألفيته العاشره | عاشقة الدموع | oO التهاني والتبريكات | 8 | 2009-12-11 06:26 PM |
تعبير رهين الشوق | الشوق | همسات أهل الشوق | 4 | 2009-10-01 09:12 PM |