Jump to content
منتدى البحرين اليوم

Recommended Posts

Posted

في السي اوت طريقتج غلط

 

كتبيه بهالطريقة بجوفينه بيقل الايرور

 

cout<<"enter your IdNumber, name, blood group,"

<<"home phone, mobile phone, house number,"

<<"block number, city and your country"<<endl;

 

وعندج غلط بعد

انتي كاتبه تحت

 

donor2.set road®;

 

شيلي الدائرة اللي داخلها حرف R

 

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

Posted
مشكوووووووووره حبيبتي يعطيج العافيه
Posted

انا سويت اوكي احس... بس طويل الامتحااان احس بعد يبيله وقت زياده

بس السؤااال مال الstruct الي نكمل البرنامج ماعرفتله :ssm11:

 

يلا .. الباقي على ربنا .. وانتي ماقلتي شسويتي؟؟؟؟؟؟

Posted

الامتحان مقارنة مع السابقة اصعب

السؤال اللي عن الكواكب ماعرفته

ما كنت ادري ان يسونة بالستركجر:(

 

عموما مو صعب وايد

 

يبي له وقت كان

لأنة كله كتابة

 

ان شاء الله خير

  • 2 weeks later...
Posted

مسامحه انشلغت شوي بالامتحانات بنزل لكم اسايمنت 5 يمكن تبونه:

 

ذي السؤااال:

 

Problem (1):

 

Write a function LinearSeachPtr that takes as parameters a pointer to an array of integers, the array size, and a key value. The function should search for the first occurrence of the key value in the array and return its position. If the value is not found it should return -1. Use loop to solve this problems. The prototype of the function is:

 

int LinearSearchPtr(int *, int, int);

 

Problem (2):

 

Write a function named isAllPositive that takes an array of integer numbers and the array size. The function should return 1 if all elements in the array are positive; otherwise, it should return zero. The function prototype is: int isAllPositives(int *array, int size

 

 

 

 

وذي الحل: :whistle:

 

 

#include<iostream>

using namespace std;

int LinearSearchPtr(int *list, int size, int value)

{

for(int i=0;i<size;i++)

if ((*(list+i))==value)

return i;

return -1;

}

 

int isAllPositives(int *array, int size)

{

for(int i=0;i<size;i++)

if (*(array+i)<0)

return 0;

 

return 1;

 

}

void main ()

{

int a[5]={0,1,2,3,4};

int s =5,v;

cout<<"enter value"<<endl;

cin>>v;

int index= LinearSearchPtr(a,s,v);

if(index!=0)

cout<<index;

int y=isAllPositives(a,s);

cout<<y<<endl;

 

}

  • 2 weeks later...
Posted

حاظرين للغاليين ...عندي اسايمنت اذا تقدروون تساعدوني في حله ..::

 

Define a class named Date that has three integer value representing hour, minute, and year with the following operations:

 

 

 

 

 

 

 

· Default constructor that initializes the date to 1/1/1980.

 

 

 

· A function that sets the date to any sensible values.

 

 

 

· Prints the date in a proper format.

 

 

 

· A function that overloads the == operator as a member function.

 

 

 

· A function that overloads the == operator as a non-member function.

 

 

 

 

 

 

 

In the main function:

 

 

 

 

 

 

 

· Define 2 objects with different dates.

 

 

 

· Print the dates.

 

 

 

· Apply the above defined 2 functions for == to compare the above defined dates and print “The dates are similar” or “The dates are different” accordingly.

 

 

 

· Assign the second date to the first date, print the dates, and compare them again by repeating the previous step.

 

 

وثنكس .. واذا حليته قبل .. بانزله لكم

Posted
افا..... محد راضي يساعدني؟؟؟ :ssm11:
Posted

هلو اختي

 

ها عرفتي تحلين منه شوي

 

انا هالجبتر ما كنت حاضره لانه السكشن من جدي مقدر احله

 

ممكن تساعديني

Guest
This topic is now closed to further replies.

×
×
  • Create New...