Kheirha

Kheirha

Share

26/07/2021

البرمجة للجميع ٦:
A simple program to calculate the areas of a square, a rectangle and a triangle:
٣) ADA:
Open a new document in any text editor (kwrite, kedit or kate).
Type the following lines:
with Gnat.Io; use Gnat.Io;
with Ada.Float_Text_IO; use Ada.Float_Text_IO;
procedure areasada is
a: integer;
b, c, d, e, f: float;
begin
Put("Enter a numbere: 1 for area of a square, 2 area of rectangle, 3 area of triangle, 4 to quit ");
Get(a);
if A = 1 then
Put("Enter length of square: ");
Get(b);
e := b * b;
Put("area of square = ");
Put(e);
New_Line;
elsif a = 2 then
Put("Enter length of rectangle base: ");
Get(c);
Put("Enter height of rectangle base: ");
Get(d);
e := c * d;
Put("area of rectangle = ");
Put(e);
New_Line;
elsif a = 3 then
Put("Enter length of triangle base: ");
Get(d);
Put("Enter height of triangle base: ");
Get(f);
e := f * d/ 2.0;
Put("area of triangle = ");
Put(e);
New_Line;
end if;
end areasada;
Save the file as simpmthada.adb
Compile it: gcc -c areasada.adb; then: gnatbl -o areasada areasada.ali
Copy the executable (compiled) file to the executables folder (directory), eg. areasada
Open the konsole window and run areasada (i.e. type areasada at the prompt).
برنامج مكتوب بالچاڤا فى أول تعليق.

18/07/2021

البرمجة للجميع ١:
سوف نبدأ سلسلة من البوستات (المشاركات بعنوان "البرمجة للجميع"، ستكون عبارة عن مشاركات لمن يريد التعرف على البرمجة وإمكانياتها للمبتدئين. ستكون باللغة الإنجليزية كما تم كتابتها منذ سنوات عديدة.
Introduction:
The programming languages that have compilers operating under Linux OS (we shall be concerned here with open source only, nothing proprietary) and will be coverd here in this series of posts are: C++, fortran77, gfortran, pascal (free pascal), SmallEiffel, ADA, Haskell, Ocaml and Java.

Language / Command line compiling command or statement / Example / Compiler type & version

C++ (GNU, gcc)/ g++ / g++ hellocpp.cpp -o hello1/ gcc v. 4.0.3
fortran77 (GNU, gcc)/ g77 / g77 -o hellog77 hello.for/ gcc v. 3.4.6
gfortran (GNU, GCC) / gfortran/ gfortran -o hellogfor hello.for/ gcc v. 4.0.3
pascal (free pascal)/ fpc/ fpc hello.pas/ v. 2.2.0
SmallEiffel (GNU)/ compile/ compile hello.e -o hellose/ gnu eiffel compiler release 0.74
HASKELL (GHC)/ ghc/ ghc -- make -o hellohaskell hello.hs/ v. 6.4.1
ADA (GNU, gcc)/ gcc then gnatbl/ gcc -c helloada.adb then gnatbl -o hello2 helloada.ali / gcc v. 4.0.3
OCaml/ ocamlopt/ ocamlopt -c amodule.ml, ocamlopt -c bmodule.ml, ocamlopt -o hellooc amodule.cmx bmodule.cmx/ version 3.10.2
Java / javac/ javac helloj.java, to run type java + the class name (eg. HelloClassApp) / JDK, version "1.5.0_13"
ملحوظة: هناك عدة توزيعات مختلفة للينوكس سطح المكتب والتى يمكن تحميلها مجانا عن طريق النت وتثبيتها جنبا إلى جنب مع ويندوز. وبالتأكيد حدثت تعديلات متعددة تالية لاصدارات اللغات المذكورة أعلاه.

13/07/2021

ياصاحبى:
ياصاحبى، اوعى تزعل فى يوم على اللى فات
ولا تشيل هم اللى جاى، فى راحة البال تبات
ابعد عن القيل والقال وتفادى المشاحنات
ماتبقاش من اللى يحبوا يعيشوا وسط المهاترات
وما يعرفوش يستمتعوا الا اما يخلقوا المشكلات
فيه ناس على طول عاوزة ودائما تقول هات
وتنسى تشكره ولا تذكره ولا حتى فى المناسبات
وغيره بيحمد اللى خلقه وهو عايش على الفتات

[قابلة للتعديل، الحذف والاضافة]

Want your school to be the top-listed School/college in Cairo?
Click here to claim your Sponsored Listing.

Category

Address


قايتباى
Cairo
٠٠٠٠٠٠٠٠