Tag Archives: رسم اشکال مختلف با کارکتر ستاره سی پلاس پلاس
رسم اشکال مختلف با کارکتر ستاره سی پلاس پلاس
عنوان پروژه
برنامه رسم اشکال مختلف با کارکتر ستاره سی پلاس پلاس
توضیحات :
نوع فایل
فرمت
سورس زبان سی پلاس پلاس
CPP , EXE
پیش نمایش از سورس کد پروژه
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <fstream.h>
#include <string.h>
#include <iomanip.h>
#define n 10
void main(){
int i,j,move;
cout<<"Display Variant of shape :\n";
cout<<"==============================\n";
//shape of cube
for(i=1;i<=n;i++){
for(j=1;j<=n;j++){
cout<<"*"<<" ";
}
cout<<"\n";
}
cout<<"\n\n";
//shape of triangle
for(i=1;i<=n;i++){
for(j=i;j<=n;j++){
cout<<"*"<<" ";
}
cout<<"\n";
}
cout<<"\n\n";
//shape of cube cross
for(i=1;i<=n;i++){
for(j=1;j<=n;j++){
if((i+j)%2==0){
cout<<"*"<<" ";
}
else{
cout<<"+"<<" ";
}
}
cout<<"\n";
}
cout<<"\n\n";
//shape of triangle middle left lamp
for(i=1;i<=n;i++){
move=0;
do{
cout<<" ";
move++;
}while(move!=i);
for(j=1;j<=i;j++){
cout<<"*"<<" ";
}
cout<<"\n";
}
cout<<"\n\n";
//shape of triangle ...