Q. Find the output of below program.
Code:
int main()
{
for(int i=1;i<=2;i++)
{
for(int j=i;j<=2;j++)
cout<<i<<@;
}
}
β
Correct Answer: (B)
1@1@2@
int main()
{
for(int i=1;i<=2;i++)
{
for(int j=i;j<=2;j++)
cout<<i<<@;
}
}
You must be Logged in to update hint/solution