+ 1
how to print different pattern
7 Respostas
+ 1
patterns like a triangle with the character "*" and like to print the alphabet " I " using the symbol "#"
+ 1
#include<iostream>
using namespace std;
int main()
{
cout<<"triangle"<<endl;
for(int i=0;i<3;i++)
{ cout<<endl;
for(int j=0;j<i+1;j++)
cout<<"*"<<" ";
}
return 0;
}
+ 1
by diff logic in loop u can make diff patterns
try it yourself
+ 1
I hope u are talking about Diamondo/Alphabet/number pattern.
for any pattern program u must understand loops,specifically for loop.
just search on google simple pattern program understand its working deeply& step by step(dont just copy it or try to mug it).then go to programiz.com website .
and try to solve more complex program on pattern on your own.
this is imp u must push your limit.give some time it will take 3days for me to understand it.
and soon it will be peace of cake 4 you.
0
of what?
0
#include <upstream>
#include <string>
using namespace std;
//class? English?
int main ()
{
string a = "whatever@symbols&you§like/here.";
char b = '£';
cout << string a << endl;
cout << char b << endl;
return 0;
}
/* Untested, and half asleep whilst typing this, but should work?
Not certain what you mean, but either of these should print characters to screen?
You can add multiple strings too... or multiple direct couts in ""s. Hope is what you meant and helps (and my answer is correct lol)
*/