You are on page 1of 1

#include <iostream>

#include <cmath>
#include <string>
using namespace std;
int main(){

int x=0,y=0,num=3;
char a='*';

for (x=-num;x<=0;x++){
for (y=-num;y<=0;y++){
if ((x%2==0)&&(abs(x)>=abs(y))){
cout<<"# ";}

else if (abs(x)>=abs(y)){
cout<<a<<" ";}

else{
cout<<" ";}}
cout<<endl;}
system ("pause");
return 0;}

You might also like