Aug 4, 2016 at 1:24pm UTC
Hi there This need to solve this question
Build a program in C++ using nested loop that gives this output (star diamond)
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
Last edited on Aug 4, 2016 at 1:25pm UTC
Aug 4, 2016 at 1:28pm UTC
Have you tried anything yourself?
Aug 4, 2016 at 1:34pm UTC
NO sir I have no idea how to create this program
I Mean No idea about this program
Aug 4, 2016 at 1:53pm UTC
http://www.cplusplus.com/forum/beginner/195411/
Aug 4, 2016 at 1:59pm UTC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
int main()
{
std::cout << "*" << std::endl;
std::cout << "* *" << std::endl;
std::cout << "* * *" << std::endl;
std::cout << "* * * *" << std::endl;
std::cout << "* * * * *" << std::endl;
std::cout << "* * * *" << std::endl;
std::cout << "* * *" << std::endl;
std::cout << "* *" << std::endl;
std::cout << "* " << std::endl;
return 0;
}
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
Exit code: 0 (normal program termination)
Last edited on Aug 4, 2016 at 2:00pm UTC