Advertisement
dxvmxnd

Untitled

Sep 16th, 2024
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n;
  5. unsigned long long result = 1;
  6.  
  7. printf("Введите значение n: ");
  8. scanf("%d", &n);
  9.  
  10. for (int i = 0; i < n; i++) {
  11. result *= 2;
  12. }
  13.  
  14. printf("2 в степени %d равно %llu\n", n, result);
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement