31-10-2009, 11:31 PM
|
#192
|
تاريخ التسجيل: Jul 2008
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
|
رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد
خيوو احمد وش سالفة هالهوم وورك ووش حله اللي في شابتر 3 ..
Track the memory in Program 4 ?
Your bank requires you to do some currency conversions. Write a function that takes the dollars and convert it to riyals then print the result in the main function. (Note: 1 Dollars = 3.75 Riyals) (Apply the Software Development Method to solve this problem)
Build a library called math_shapes.h that contains of the 2 functions described in Program 4:
1. circle_area() 2. circle_area()
and re-write the Program 4 by including the new library and removing the 2 functions from the code? (Show the code of the two files and the output in ONE page only)
|
Your bank requires you to do some currency conversions. Write a function that takes the dollars and convert it to riyals then print the result in the main function. (Note: 1 Dollars = 3.75 Riyals) (Apply the Software Development Method to solve this problem)
|
الحل :

كود:
/*
Your bank requires you to do some currency conversions.
Write a function that takes the dollars and convert it to
riyals then print the result in the main function.
(Note: 1 Dollars = 3.75 Riyals) (Apply the Software Development
Method to solve this problem)
*/
#include <stdio.h>
float dollars_To_riyals (float cost);
int main(void) {
float d;
printf("Please Enter the cost in dollars to convert to Riyals : ");
scanf("%f",&d);
printf("\nThe Cost in Riyals = %.3f\n",dollars_To_riyals(d));
return 0;
}
float dollars_To_riyals (float cost) {
return (3.75 * cost);
}
النتيجة :

السؤال الثاني في رد ثاني إن شاء الله .
|
|
سبحان الله وبحمد ,,, سبحان الله العظيم الحمد لله كما ينبغي لجلال وجهه وعظيم سلطانه . اللهم صل على محمد وعلى آل محمد كما صليت على إبراهيم وعلى آل إبراهيم إنك حميد مجيد . اللهم بارك على محمد وعلى آل محمد كما باركت على إبراهيم وعلى آل إبراهيم إنك حميد مجيد.
|
|
|
|