Programming paradigms in c++ ppt sumita arora
Answers
Answered by
0
Hi!
I think you are searching for programs in C++ that print patterns like this
1 . *
* *
* * *
2. * * *
* *
*
and many more..
Here's the code of example (1)
\* Code Start *\
#include <iostream>
int main()
{
int rows;
cout << "Enter number of rows: ";
cin >> rows; \\ User can input no. of rows
for(int i = 1; i <= rows; ++i) \\ Else you can manually allocate
{ \\ the no. of rows in rows variable
for(int j = 1; j <= i; ++j)
{
cout << "* ";
}
cout << "\n";
}
return 0;
}
\* Code End *\
Hope you got it. Ask for any doubts. Thanks
And... Ya... If you liked the answer please mark it Brainliest !
Thank You !
I think you are searching for programs in C++ that print patterns like this
1 . *
* *
* * *
2. * * *
* *
*
and many more..
Here's the code of example (1)
\* Code Start *\
#include <iostream>
int main()
{
int rows;
cout << "Enter number of rows: ";
cin >> rows; \\ User can input no. of rows
for(int i = 1; i <= rows; ++i) \\ Else you can manually allocate
{ \\ the no. of rows in rows variable
for(int j = 1; j <= i; ++j)
{
cout << "* ";
}
cout << "\n";
}
return 0;
}
\* Code End *\
Hope you got it. Ask for any doubts. Thanks
And... Ya... If you liked the answer please mark it Brainliest !
Thank You !
Answered by
0
Hey !
A Programming Paradigm defines the methodology of designing and implementing programs using the key features and building blocks of a programming language
Similar questions