-
Notifications
You must be signed in to change notification settings - Fork 22
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
base: master
Are you sure you want to change the base?
Conversation
return number; | ||
} | ||
count++; | ||
} while (exponential > count); |
There was a problem hiding this comment.
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
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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?
I've added a new function for solution task 1.3