Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for task 1.3 #27

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Solution for task 1.3 #27

wants to merge 6 commits into from

Conversation

4MoPDai
Copy link

@4MoPDai 4MoPDai commented Aug 20, 2019

I've added a new function for solution task 1.3

return number;
}
count++;
} while (exponential > count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too complex. Lets do it with for loop

Copy link
Author

@4MoPDai 4MoPDai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit my function by adding a loop for

int result = number;

for (int i = 1; i < exponential; i++) {
if (exponential == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@4MoPDai Maybe it will be better to move this if out from the loop? If exponential == 0 how you will go over the loop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants