موقع طلبة جامعة البحرين

يمكنك تصفح الموقع كزائر ولكن ندعوك لتسجيل عضوية خاصة بك لتحصل على كافة الصلاحيات مثل تنزيل ملفات المكتبة وقراءة تعليقات هيئة التدريس وغيرها. يمكنك الحصول على عضوية مجانية بالضغط على زر تسجيل. إذا قمت بالتسجيل مسبقا فيمكنك الضغط على زر دخول.

تسجيل دخول
  • قسم المكتبة الجامعية مغلق مؤقتا بعد الاستهداف التي تعرضت له بعض خدمات أمازون في البحرين، جاري استرجاع الملفات ونقلها إلى سيرفرات جديدة وسيتم بعدها اعادة افتتاح المكتبة

ITCS103 -CSC103-ITCS111-ITCS101 للدراسة و المناقشة الجماعيه 2014-2015

ما هو رأيك في الحصة و بشكل عام ( الشرح - المواضيع -الأسلوب )؟

  • سيئ ، لم أفهم شيئا .

    الأصوات: 9 28.1%
  • جيد ، فهمت نص و نص .

    الأصوات: 10 31.3%
  • ممتاز ، واضح و مقبول .

    الأصوات: 13 40.6%

  • مجموع المصوتين
    32
مافهمت :sad_1: ليش يطلع في ال output بس كلمة error ؟؟

بسبب هذا الشرط << يعني مافي ملف
كود:
if (!in){cout<<"Error ...\n";system("pause");return 0;}

قصدي احنا نسوي الفايل نكتب فيه مواصفات جم سيارة؟؟

اي لازم تسوون الملف اللي فيه المواصفات عشان البرنامج يشتغل :smile2:
 
عرفت الخطأ في الجواب في البداية خالين return0 المفروض return1 وبعد لازم نسكر الفايل
 
السلام عليكم
ممكن تساعدوني في هالسؤالين


  1. Define a function named PASS_Count that accepts an array of double values named scores, an integer value size, and a double value named passing_score. The function should count and return the number of passing scores. A score is considered to be passed if its value is greater than or equal to the passing_score.


  1. Write the main program that declares and reads 20 double values into an array scores. The program also should prompts the user to input passing_score.Use the function Pass_Count to return number of passing scores and print it.

:RpS_crying:
 
ممكن شرح هالسؤالين مو فاهمتنهم

996352453.png


هذا برنامج سمونه swap بحيث ينقل قيمة x إلى y :
- ينقل قيمة x إلى z
- ينقل قيمة y إلى x
- يرجع قيمة x الموجودة في z إلى y


184680175.png


لوب تبدأ من 1 الى 3 فيها فنكشن و s يجمع القيم اللي تطلع من الفنكشن
داخل الفنكشن في static "
يحفظ آخر تعديل على القيمة في الفنكشن"
1%3 = 1 .... 1+2=3
2%3=2 .... 3+2=5
3%3=0 .... 5+0=5
3+5+5=13
 
السلام عليكم
ممكن تساعدوني في هالسؤالين Define a function named PASS_Count that accepts an array of double values named scores, an integer value size, and a double value named passing_score. The function should count and return the number of passing scores. A score is considered to be passed if its value is greater than or equal to the passing_score.



Write the main program that declares and reads 20 double values into an array scores. The program also should prompts the user to input ​passing_score.Use the function Pass_Count to return number of passing scores and print it.


:RpS_crying:
1)
فنكشن
PASS_Count
كود:
int PASS_Count (double scores[],int size,double passing_score)
تحسب كم رقم في " []scores " اكبر او يساوي " passing_score " وترجع عددهم ..
2)
برنامج يخلي اليوزر يدخل 20 رقم في "
[]scores " و يدخل " passing_score " بعدين تستخدمون الفنكشن
 
ممكن مساعد بغيت نماذج متحانات فاينل مال ltsc103 والي عنده اي فكر عن الاسئلة الي تكرر في متحان يساعدني
 
A pizza restaurant sells 5 types of pizza .write a C++ program that aske user to enter the number of pizza sold every day of the week .the program should find the sum of each type of pizza sold in the week and sum of pizza sold in each day.
​
 
The program run should be as follows note that the input is in bold:
Enter the number of pizza-type1 sold in the week: 12 20 11 18 23 15 16
Enter the number of pizza-type2 sold in the week: 22 15 21 9 7 12 15
Enter the number of pizza-type3 sold in the week: 5 11 8 23 11 11 11
Enter the number of pizza-type4 sold in the week: 7 9 10 14 11 5 6
Enter the number of pizza-type5 sold in the week: 15 21 21 12 8 9 16



The number of pizza-type1 sold during the week is 115
The number of pizza-type2 sold during the week is 101
The number of pizza-type3 sold during the week is 80
The number of pizza-type4 sold during the week is 62
The number of pizza-type5 sold during the week is 102

The number of pizza sold in the day1 is 61
The number of pizza sold in the day2 is 76
The number of pizza sold in the day3 is 71
The number of pizza sold in the day4 is 76
The number of pizza sold in the day5 is 60
The number of pizza sold in the day6 is 52
The number of pizza sold in the day7 is 64

​
ممكن تساعدوني في الحل ؟؟!:nosweat:
 
ممكن تساعدوني في هذا الاسايمنت عفست الدنيا :nosweat:
.....
هذا الاسايمنت
A positive integer n is said to be prime (or, "a prime") if and only if n is greater than 1 and is divisible only by 1 and n . For example, the integers 17 and 29 are prime, but 1 and 38 are not prime. Write a function named "is_prime" that takes a positive integer argument and returns as its value the integer 1 if the argument is prime and returns the integer 0 otherwise. Thus, for example:​
cout << is_prime(19) << endl; // will print 1
cout << is_prime(1) << endl; // will print 0
cout << is_prime(51) << endl; // will print 0
cout << is_prime(-13) << endl; // will print 0

وهذا حلي :whistling:
#include <iostream>
using namespace std;
int is_prime (int n)
{
int prime;
if (n>1 && prime%1&n){

cout<<"1";}
else
cout<<"0";
return (n);
}
int main(){
int prime;
cout<<"is_prime";
cin>>prime;
int x=2;
int is_prime (x);

system ("pause");
return 0;
}
​
 
ممكن تساعدوني في هذا الاسايمنت عفست الدنيا :nosweat:
.....
هذا الاسايمنت
A positive integer n is said to be prime (or, "a prime") if and only if n is greater than 1 and is divisible only by 1 and n . For example, the integers 17 and 29 are prime, but 1 and 38 are not prime. Write a function named "is_prime" that takes a positive integer argument and returns as its value the integer 1 if the argument is prime and returns the integer 0 otherwise. Thus, for example:​
cout << is_prime(19) << endl; // will print 1
cout << is_prime(1) << endl; // will print 0
cout << is_prime(51) << endl; // will print 0
cout << is_prime(-13) << endl; // will print 0

الفنكشن
كود:
int is_prime (int n)
{
	if (n<=1) return 0;
	for (int i=2;i<n;i++)
		if (n%i==0)
			return 0;
	return 1;
}
وتستخدمونها مثل السؤال .. :smile2:
كود:
cout << is_prime(-13) << endl;
 
The program run should be as follows note that the input is in bold:
Enter the number of pizza-type1 sold in the week: 12 20 11 18 23 15 16
Enter the number of pizza-type2 sold in the week: 22 15 21 9 7 12 15
Enter the number of pizza-type3 sold in the week: 5 11 8 23 11 11 11
Enter the number of pizza-type4 sold in the week: 7 9 10 14 11 5 6
Enter the number of pizza-type5 sold in the week: 15 21 21 12 8 9 16



The number of pizza-type1 sold during the week is 115
The number of pizza-type2 sold during the week is 101
The number of pizza-type3 sold during the week is 80
The number of pizza-type4 sold during the week is 62
The number of pizza-type5 sold during the week is 102

The number of pizza sold in the day1 is 61
The number of pizza sold in the day2 is 76
The number of pizza sold in the day3 is 71
The number of pizza sold in the day4 is 76
The number of pizza sold in the day5 is 60
The number of pizza sold in the day6 is 52
The number of pizza sold in the day7 is 64

​
ممكن تساعدوني في الحل ؟؟!:nosweat:

https://www.uob-bh.com/forum/showthread.php?t=29541&p=652583&viewfull=1#post652583
 
السلام عليكم و رحمة الله وبركاته
شخباركم ؟؟ عسساكم طيبين :smile:
عندي اسايمنت ما عرفت احل جزء منه :nosweat:
بس اذا ممكن أحد يفهمني هذا الجزء لو سمحتوا (الجزء اللي أطلع فيه الريزلت أو كيف أطلع العناصر المشتركة )
بكون مشكورة وممنونة لهذا الانسان
السؤال >>
Write acomplete C program that asks the user to input two sets of integer numbers eachof size 5 and store them in two arrays A and B. The program then outputs theelements that are common to both sets (available in both A and B). If there areno common elements, the program should output the message "No commonelements ".

An example ofthe program RUN:
Enter thevalues of A[0] and B[0] >2 4
Enter thevalues of A[1] and B[1] >1 6
Enter thevalues of A[2] and B[2] >5 2
Enter thevalues of A[3] and B[3] >7 5
Enter thevalues of A[4] and B[4] >6 3
The resultis:
256
 
كود:
for (int i = 0; i < 5; i++ ){
for (int j = 0; j < 5 ; j++){


if ( A[i] == B [j] )
 cout<<A[i];
}


}
هذا الكود بس عشان تطلعين العناصر المشتركة ..
 
السلام عليكم و رحمة الله وبركاته
شخباركم ؟؟ عسساكم طيبين :smile:
عندي اسايمنت ما عرفت احل جزء منه :nosweat:
بس اذا ممكن أحد يفهمني هذا الجزء لو سمحتوا (الجزء اللي أطلع فيه الريزلت أو كيف أطلع العناصر المشتركة )
بكون مشكورة وممنونة لهذا الانسان
السؤال >>
Write acomplete C program that asks the user to input two sets of integer numbers eachof size 5 and store them in two arrays A and B. The program then outputs theelements that are common to both sets (available in both A and B). If there areno common elements, the program should output the message "No commonelements ".

An example ofthe program RUN:
Enter thevalues of A[0] and B[0] >2 4
Enter thevalues of A[1] and B[1] >1 6
Enter thevalues of A[2] and B[2] >5 2
Enter thevalues of A[3] and B[3] >7 5
Enter thevalues of A[4] and B[4] >6 3
The resultis:
256

تفضلوا .. :smile2:
كود:
bool f=false;
for (int i=0;i<5;i++)
	for (int j=0;j<5;j++)
	if(A[i]==B[j]){cout<<A[i];f=true;break;}
if (f==false)
cout<<"No commonelements"<<endl;
 
Assignment# 9

Three exam scores of n students (n cannot exceed 100) are stored in a two-dimensional array. Write a C++ program that computes the score average for each student and save the results in the 4[SUP]th[/SUP] column (of the same array). Then compute the score average of every exam and save the results in the n+1[SUP]th[/SUP] row (of the same array).

The following table illustrates the problem.


[TABLE="width: 447, align: center"]
[TR]
[TD]
[/TD]
[TD]Exam 1
[/TD]
[TD]Exam 2
[/TD]
[TD]Exam 3
[/TD]
[TD]Student Average
[/TD]
[/TR]
[TR]
[TD]Student 1
[/TD]
[TD]97.0
[/TD]
[TD]24.75
[/TD]
[TD]56.25
[/TD]
[TD]?
[/TD]
[/TR]
[TR]
[TD]Student 2
[/TD]
[TD]34.25
[/TD]
[TD]81.25
[/TD]
[TD]69
[/TD]
[TD]?
[/TD]
[/TR]
[TR]
[TD]…
[/TD]
[TD]…
[/TD]
[TD]…
[/TD]
[TD]…
[/TD]
[TD]?
[/TD]
[/TR]
[TR]
[TD]Student n
[/TD]
[TD]85.5
[/TD]
[TD]79
[/TD]
[TD]92.5
[/TD]
[TD]?
[/TD]
[/TR]
[TR]
[TD]Exam Average
[/TD]
[TD]?
[/TD]
[TD]?
[/TD]
[TD]?
[/TD]
[TD]?
[/TD]
[/TR]
[/TABLE]


Write a C++ program in which you:

a) Prompt the user to enter the number of the students n.
b) Prompt the user to enter the scores into two-dimensional array of the n students (the non-shaded numbers).
c) Compute the average score of every student and store it in the last column,
d) Compute the average of every exam and store it in the last raw.
e) Display the above array exactly like it is drawn including the scores and the calculated averages (format the output to 2 decimal places. You don’t need to display the headings

ممكن احد يساعدني فيه لا هنتوا :((
 
Assignment# 8

Write a C++ program that asks the user to enter 12 temperatures for each month in the year and store them in a one-dimensional array called “temps”.
The program should find and print the average temperature of TEN months after excluding the months with the maximum and the minimum temperatures.

Your program should run as follows:
clip_image001.gif


Enter temperature for month 1: 35
Enter temperature for month 2: 40
Enter temperature for month 3: 45
Enter temperature for month 4: 48
Enter temperature for month 5: 46
Enter temperature for month 6: 42
Enter temperature for month 7: 38
Enter temperature for month 8: 37
Enter temperature for month 9: 36
Enter temperature for month 10: 32
Enter temperature for month 11: 33
Enter temperature for month 12: 34

Average Temperature = 38.6
Press any key to continue…

​
 
السلام عليكم
ممكن مساعده في الحل








A car dealer has 10 salespersons. Each salesperson keeps track of the number of cars sold each month and reports it to the management at the end of the month. The management keeps the data in a file and assigns a number, 1 through 10, to each salesperson. The following statement declares an array, cars, of 10 components of type int to store the number of cars sold by each salesperson.
int cars[10];
Write the code to:
1. Store the number of cars sold by each salesperson in the array cars.
2. Output the total numbers of cars sold at the end of the month.
3. Output the salesperson number selling the maximum number of cars.


(Assume that data is in the file cars.txt)

Not: you should use loop to solve this question.

Please use this file as your input file, each line represents the number of cars sold by one salesperson during one month. i.e. the first line represents the cars sold by salesperson number 1 and so on.
cars.txt
[TABLE="width: 100%"]
[TR]
[TD]5
4
7
3
9
4
6
2
8
1

[/TD]
[/TR]
[/TABLE]
 
مشكورين يعطيكم العافية
 
عودة
أعلى أسفل