Advertisement
coder2k

Untitled

Jun 18th, 2024
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "utils.h"
  3.  
  4. int main(void) {
  5.     const int a = 40;
  6.     const int b = 2;
  7.     const int result = sum(a, b);
  8.     printf("%d + %d = %d\n", a, b, result);
  9.  
  10.     const int numbers[] = { 1, 2, 3, 4, 5 };
  11.     const int* const begin = numbers;
  12.     const int* const end = numbers + sizeof(numbers) / sizeof(numbers[0]);
  13.     print(begin, end);
  14.  
  15.     print_global();
  16.     global += 11;
  17.     print_global();
  18.  
  19.     const Vec2 v1 = { 1.23, 4.56 };
  20.     const Vec2 v2 = { 0.07, 1.24 };
  21.     const Vec2 v3 = vec2_add(v1, v2);
  22.     vec2_print(v3);
  23.     const Vec2 v4 = vec2_subtract(v1, v2);
  24.     vec2_print(v4);
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement