Diamond

  • Uploaded by: Muhammad Rana Farhan
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Diamond as PDF for free.

More details

  • Words: 67
  • Pages: 2
Diamond #include #include void main() { clrscr(); int mid; cout<<"Enter The Length of The diamond: "; cin>>mid; int s=mid+mid; int f1=mid; int f2=mid; for (int i=1;i<s;i++) { for (int j=1;j<s;j++) { //if(j==f1||j==f2) //hollow if (j>=f2&&j<=f1||j>=f1&&j<=f2) //filled cout<<"*"; else cout<<" "; } f1++; f2--; if (f1==(s-1)&&f2==1) { f1=1; f2=s-1; } cout<<endl; } getch(); }

Click the link below to see more examples URL: http://ravianeducation.blogspot.com E-Mail: [email protected] Farhan: 03008855006

Related Documents

Diamond
June 2020 15
Htc Diamond
November 2019 18
Diamond Planner
July 2020 5
Diamond 1
June 2020 8
Diamond Cuts
July 2020 15

More Documents from "Jaime Bailey"

Factorial
June 2020 13
Lecture 10
June 2020 19
Scientific Calculator
June 2020 8
Intermediate Part Ii
June 2020 9
Intermediate Part Ii
June 2020 6