InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > المنتدى العام لكلية الحاسبات وتقنية المعلومات
التسجيل مشاركات اليوم البحث
   
   


المنتدى العام لكلية الحاسبات وتقنية المعلومات قسم خاص بالمواد العامة و الطلاب غير المتخصصين بكلية الحاسبات وتقنية المعلومات

[cpcs 202 - برمجة 1] لديك سؤال , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

المنتدى العام لكلية الحاسبات وتقنية المعلومات

إضافة رد
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 31-10-2009, 11:31 PM
الصورة الرمزية Mr.Ahmad

Mr.Ahmad Mr.Ahmad غير متواجد حالياً

عضو هيئة تدريس

 
تاريخ التسجيل: 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); }
النتيجة :



السؤال الثاني في رد ثاني إن شاء الله .

 


توقيع Mr.Ahmad  

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

 

رد مع اقتباس

 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 01-11-2009, 12:01 AM   #2

Mr.Ahmad

عضو هيئة تدريس

الصورة الرمزية Mr.Ahmad

 
تاريخ التسجيل: Jul 2008
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , واجبات , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

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
الحل :

ملف الهيدر :



كود:
#include
<stdio.h>
double
circle_area (double radius) { return 3.14 * radius * radius; }
double
circle_cirum (double radius) { return 2 * 3.14 * radius; }
وظيفة main :



كود:
/* 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 t he new library and removing the 2 functions from the code? (Show the code of the two files and the output in ONE page only */
#include
<stdio.h>
#include
"math_shapes.h"
int
main(void) { float d; printf("Please Enter the radius : "); scanf("%f",&d); printf("\nThe area of circle = %.3f\n",circle_area(d)); printf("\nThe cirum of circle = %.3f\n",circle_cirum(d)); return 0; }
النتيجة :

 

Mr.Ahmad غير متواجد حالياً   رد مع اقتباس
 

إضافة رد


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 10:09 AM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2025