Arian Bn
unread,Dec 4, 2010, 9:27:40 AM12/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to مبانی کامپیوتر و برنامه سازی سال 89 نرم افزار
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
int main()
{
int p;//place
int a,b,n,t;
// cin>>a>>b;
while(cin>>a)
{
cin>>b;
int a2=a/2,b2=b/2,ab2=((a*a)*(b*b))/16;
for(int i=0;i<=a;i++)
{
for(int j=0;j<=b;j++)
{
if(b2*b2*(i-a2)*(i-a2)+a2*a2*(j-b2)*(j-b2)<=ab2)
cout<<'*';
else
cout<<' ';
}
cout<<'\n';
}
cout<<'\n';
}
return 0;
}