here is my code ???
and i;m not able to decode my error please help me …hoe to decode my error.
What's the error in my code
Hey I think u have shared different link . it does not contain anything related to square root.can u please check
#include
using namespace std;
int main() {
int n;
cin>>n;
for(int i=1;i<=n;i++){
for (int space=1;space<=n-i;space++){
cout<<" ";
}
int val = i;
for (int cnt = 1;cnt<=i;cnt++){
cout<<val;
val=val+1;
}
val=val-2;
for (int cnt=1;cnt<=i-1;cnt++){
cour<<val;
val=val-1;
}
cout<endl;
}
return 0;
can u please provide the problem link ?
actually bro i don’t have the question so i am asking for question link or name
Okay …So the question is PATTERN NUMBER PYRAMID.
where the pyramid is like
1
2 3 2
3 4 5 4 3
and it goes on further.
hey @Legendankit can u please verify it by submitting this code - https://ide.codingblocks.com/s/172606
As i can see that your code is running perfectly but can i know what was the issue or error in my code, why it was not executing .
your code was correct .i have changed space with tab ( 5 space using \t) and it worked.
it was showing me error in 13 line and many so how that can be rectified only by adding “\t”
can u please share ur code
your line no 19 has a typo .it should be cout but you are using cour
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.