مرحبا زملائي في مكسات
متل ما وعدتكم
هاي كودات مرة تانية و اسف عالتاخير بس امتحانات .. اعذروني
الاول :
#include <iostream.h>
main ()
{
int value[5] , max,index=0;
for (j=0;j<5;j++)
cin>> value[j];
max = value[0];
for ( j=1; j<5;j++)
if ( value[j] > max)
{
max = value[j];
index=j;
}
cout<<"max value ="<<max;
cout<<"index ="<<index;
for ( j=0;j<5 ; j++)
cout<< value[j]<<"\t";
cout<<"\n\n\n\n\n\n\n\n\n done by moh3m2002@hotmail.com";
return 0;
}
الثاني :
#include <iostream.h>
main ()
{
int num,odd=0,even=0;
cin>>num;
while ( num!= -1 )
{
if ( num %2==0)
even++;
else
odd++;
cin>>num;
}
cout<<"the even number is = "<<even ;
cout<<"the odd number is = "<< odd;
return 0;
}
الثالث :
#include <iostream.h>
main ()
{
int a,b,net,mb,y;
cout<<"plz enter the sales :";
cin>>a;
if (a<250)
b = a*0.05;
else
{
if (a>100)
b=a*0.20;
else
b=a*.15;
}
net = a-b;
y=net*30;
mb=b*30;
cout<<"b ="<<b;
cout<<"y = "<<y;
cout<<"mb ="<<mb;
return 0;
}
الرابع :
#include <iostream.h>
main()
{
float x,y;
do
{
y=x*x+4*x;
cout<<<x<<"\t"<<y;
x+=0.5;
}
while(x<10)
return 0;
}
يله يا شباب مين بعرف لايش هاي البرامج ؟؟؟؟
بانتظار الردود
تحياتي
كــــــــــاظم الساهــــــــــــــر
المفضلات