Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do I make this using code

+1 vote
asked Sep 12, 2018 by ileana
**********************
This is my second
program in C++!
*********************

5 Answers

+1 vote
answered Sep 12, 2018 by R (160 points)
For best practice, use WD40
commented Sep 12, 2018 by ileana
i just want to know which code make the star line
0 votes
answered Sep 12, 2018 by Fady Serhan

you can do star line by simple for loop:

using namespace std;

int main()

{

int Stars;

cout << "Enter number of starts"

cin >> Stars;

for(int i=0; i<Stars ; i++)

cout <<"*";

return 0;

}

0 votes
answered Sep 14, 2018 by Selvapriya28 (160 points)
#include<iostream.h>

void main()

{

int n,i,j;

cout<<"enter the number:";

cin>>n;

for(i=1;i<=n;i++)

{

for(j=i;j<=i;j++)

{

cout<<"*";

}

cout<<\n;

}

}
commented Sep 15, 2018 by Yunwen Zhu (120 points)
that's not even what he/she asked for
0 votes
answered Sep 14, 2018 by prabhakara (140 points)

**********************
This is my second
program in C++!
*********************

+2 votes
answered Sep 14, 2018 by RoadRomeo1 (260 points)
like that:

#include<stdio.h>

int main(){

for(int i=1;i<=22;i++){
printf("*");
}

printf("\nThis is my second \n program in c++ \n ");

for(int i=1;i<=22;i++){
printf("*");
}

return 0;

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...