Diamond:
In this post of shapes in c, you will find the code of diamond problem in C++ using "*".Code:
copy your code from below:
/* Join us athttp://shapesinc.blogspot.comfor more codes of shapes*/#include<iostream>using namespace std;int main(){cout << "Join http://shapesinc.blogspot.com for more codes of shapes\n\n";int length=0;cout << "Enter the size of the Diamond\n";cin>>length;for(int i=length, k=0; i>=0; i--, k++){for(int j=0; j<length+k; j++){if(j>i)cout << "*";elsecout << " ";}cout<<endl;}for(int i=1, k=length; i<length; i++, k--){for(int j=0; j<length+k-1; j++){if(i<j)cout << "*";elsecout << " ";}cout<<endl;}}
Too many errors in these codes
ReplyDeletetell me which C++ client are you using
Thank You
At my side, it's perfectly running!!!
DeleteIs there any logical error or compile time error??
Please state your views ... we'll solve it and update you with it!!!
Thanks for your concern!!!
Please upload the C++ compiler or give me the link to that compiler or give me name of that compiler so that I can try this
DeleteI think that error is due to my compilers.There are different codes for different compilers.
Thanks for your effort
Appreciate your work
keep them coming
Thank You
Thank you dear...
DeleteNo problem ... wait for some hours ... I'll upload an article that how to run this code in your turbo C++ compiler ... And then you can run this code and enjoy it and yeah run that moving fan one too ... that one is amazing ...
And this code works in Microsoft visual studio 2012 ... Use this compiler ... Turbo C++ is very old now and it is very difficult to use for people like us :)