الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ممكن تساعدوني في حل البرنامج ؟؟؟؟

مغلق
بدأه رنيم في 18 ديسمبر 2001 · 2 رد · 497 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

بسم الله الرحمن الرحيم

السلام عليكم ورحمة الله وبركاته

اولا احب ارحب بالجميع في هذا المنتدى الطيب ..... واتمنى قبولي في منتدكم .

واحب انكم تساعدوني في حل هذا البرنامج وابغى تعطوني طريقه سهله لحل اي برنامج لاني بصراحه اواجه صعوبه شديده.

Write a program that prompts for and reads the initial balance of a bank customer. The program must reject an initial balance that is less than 500 Riyals. In this case the user must be prompted to enter another value.

If the initial balance is valid, the program should prompt for and read a transaction code (1for deposit, 2 for withdrawal) and an amount to be deposited or withdrawn until a sentinel of -1 -1 is read. After each successful transaction, the current balance of the customer should be displayed

Note your program must display an appropriate error message for each of the following cases:

a) An invalid transaction code.

B) A negative deposit or withdrawal amount.

c) An attempt to withdraw more than the current balance.

#2

السلام عليكم

هلا اختي رنيم ان شاء الله تكونين معانا دايما:)

بس لو تحطين محاولاتك يكون افضل وان شاء الله الكل راح يساعدك:rolleyes:

#3

example for reading initial balance:

int balance,tag;

repeat

{

tag=1;

scanf("%d",balance);

if(balance<500)

{

printf("The initial balance(%s) must be greater than 500n",balance);

tag=0;

}

}

until(tag);

using the same way you can change the conditions to preview the error messages after creation

and for showing the balance is easy by:

printf("The balance: %sn",balance);

and so on

if there is any problem please let me know.

night.gif

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…