loading...
::.. کد نویس جوان ..::
MR2OD بازدید : 3 سه شنبه 23 مهر 1392 نظرات (0)

آقا ما هفته ی قبل یه تمرینی داشتیم با این مضمون :

برنامه ای بنویسید که مقادیر آرایه ی n عنصری را از ورودی خوانده و جمع عناصر آرایه را به خروجی ببرد ( با جدول )

ینی من سه شنبه هفته قبل از 9 صبح تا 3 بعداز ظهر نشستم نوشتمش تروخدا این و استفاده کردید یه صلوات بفرستید نیشخند

 


//================ in the name of allah =====================//
//============= the main program with tables ===============//
//================== MR2OD Corporation =====================//
#include <iostream.h>
#include <conio.h>
int main()
{
gotoxy(25,1);
cout << "In The Name Of G"<<char(3)<<"D" ;
//========== moteghaier ha
int i , a , b , c , d , e , f , g , h , sum=0 , input , array[500] ;
//========== daryaft tedad onsore araye
gotoxy(20,3);
cout << " Enter Number Of Elements "<<char(16)<<" " ;
cin >> input ;
//================ khate ofoghe bala
gotoxy(20,5);
for(i=1 ; i<=30 ; i++ )
{
cout << char(196) ;
}
//================ sepreator khate ofoghe bala
gotoxy(38,5);
cout << char(194) ;
//================ khate amoode vasat
e = 38 ;
f = 6 ;
for(f=6 ; f<13 ; ++f )
{
gotoxy(e,f) ;
cout << char(179) ;
}
//================ gooshe chap bala
gotoxy(20,5);
cout << char(218) ;
//================ gooshe rast bala
gotoxy(50,5);
cout << char(191) ;
//================ khate amoode chap
a = 20 ;
b = 6 ;
for(b=6 ; b<15 ; ++b )
{
gotoxy(a,b) ;
cout << char(179) ;
}
//================ sepreator khate amoode chap ( ghesmate bala )
gotoxy(20,8);
cout << char(195) ;
//================ khate ofoghe vasat ( ghesmate bala )
g = 21 ;
h = 8 ;
for(g=21 ; g<50 ; ++g )
{
gotoxy(g,h) ;
cout << char(196) ;
}
//================ sepreator khate ofoghe vasat ( ghesmate bala )
gotoxy(38,8);
cout << char(193) ;
//================ sepreator khate amoode chap ( ghesmate paeen )
gotoxy(20,13);
cout << char(195) ;
//================ khate ofoghe vasat ( ghesmate paeen )
g = 21 ;
h = 13 ;
for(g=21 ; g<50 ; ++g )
{
gotoxy(g,h) ;
cout << char(196) ;
}
//================ sepreator khate ofoghe vasat
gotoxy(38,13);
cout << char(193) ;
//================ khate ofogh paeen
gotoxy(20,15);
for(i=1 ; i<=30 ; i++ )
{
cout << char(196) ;
}
//================ gooshe chap paeen
gotoxy(20,15);
cout << char(192) ;
//================ gooshe rast paeen
gotoxy(50,15);
cout << char(217) ;
//================ khate amoode rast
c = 50 ;
d = 6 ;
for(d=6 ; d<15 ; ++d )
{
gotoxy(c,d) ;
cout << char(179) ;
}
//================ sepreator khate amoode rast ( ghesmate bala )
gotoxy(50,8);
cout << char(180) ;
//================ sepreator khate amoode rast ( ghesmate paeen )
gotoxy(50,13);
cout << char(180) ;
//================ texte counter bala chap
gotoxy(25,7);
cout << " Counter " ;
//================ texte value bala rast
gotoxy(40,7);
cout << " Value " ;
//================ badane aslie barname
for (i=0 ; i<=input-1 ; ++i )
{
gotoxy(21,11);
cout << "Enter Number["<<i+1<<"]:" ;
gotoxy(43,11);
cin >> array[i] ;
sum += array[i] ;
gotoxy(40,11);
cout << " " ;
}
//================ mohasebeye majmooe adad
gotoxy(26,14);
cout << "Aggregate" ;
gotoxy(38,14);
cout << char(175) ;
gotoxy(42,14);
cout << sum ;
//================ chape akhar ghesmate value !
gotoxy(39,11);
cout <<"sufficient!";
//================ chape akhar
gotoxy(32,17);
cout <<"That,s it!";


getch();
return 0;
}

اطلاعات کاربری
  • فراموشی رمز عبور؟
  • آرشیو
    آمار سایت
  • کل مطالب : 2
  • کل نظرات : 0
  • افراد آنلاین : 2
  • تعداد اعضا : 0
  • آی پی امروز : 1
  • آی پی دیروز : 6
  • بازدید امروز : 3
  • باردید دیروز : 1
  • گوگل امروز : 0
  • گوگل دیروز : 0
  • بازدید هفته : 4
  • بازدید ماه : 4
  • بازدید سال : 8
  • بازدید کلی : 46