Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6590989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:22:05+00:00 2026-05-25T17:22:05+00:00

I am self studying C++ and I was thinking of a simple program to

  • 0

I am self studying C++ and I was thinking of a simple program to get comfortable with the syntax.

int main(){
int num;
cout << "Enter a positive number:";
cin >> num;
printStar(num);
}

void printStar(int num){
.............................
}

Such that the function printStar accepts an integer and prints * for instance accepts 3 and prints *** or accepts 6 and prints ****** or accepts 2 and prints **. I was thinking of using a for or while loop and getting it done any better ideas suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:22:06+00:00Added an answer on May 25, 2026 at 5:22 pm

    Since this is for your own learning, i am not giving a solution, a hint is using For or While loop. If it works, its good, otherwise post your code and problem.

    A link to get you started

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am self studying computer architecture offer at Michigan university. I do not understand
I'm stuck with this. I'm self studying assenbler and translating some basics instructions. But
[[self mainFrame] loadHTMLString:@<html><body><link href='main.css' rel='stylesheet' type='text/css' /></body></html> baseURL:nil]; I am trying to load a
Assuming self-registration is used to install components as part of a larger installer program,
I'm currently self-studying C# in my free time and thought of a little project
I'm currently self-studying C for mastering an university project. In that project we have
I'm studying object literals and self-executing functions in Javascript. Looking through some YUI code
I'm studying for a M$ certificate. I use the 'self-paced' Training Kit (book). I
self.tableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain]; How do I get the proper size from
Consider: [self.navigationController popToViewController:[[self.navigationController viewControllers]objectAtIndex:1] animated:YES]; Is there a better way to get index of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.