Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Answer for last midterm question
//gcc 5.4.0 #include <stdio.h> int main(void) { int num, result, counter; printf("Enter a positive number:\n"); scanf("%d", &num); result = 1; counter = 1; //Do we need the counter? Why or why not? if (num != 0) for (counter=1; counter<=num; counter++) { result *= 2; } printf("Two raised to the %d power is:%d\n", num, result); }
run
|
edit
|
history
|
help
0
Lab 11 v.05
Nice1
SOLUCION EJERCICIO SPOTIFY
ptr[]
Max2
switch_nota
NETFLIX TERMINADO
Student. Txt
1.5 No. of Processors
Programação em C, testes