generated from admin/template
lab-02
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
// task 1
|
||||
// long quot(long a, long b) {
|
||||
// return a / b;
|
||||
// }
|
||||
|
||||
// task 2
|
||||
// long swap(unsigned short a) {
|
||||
// return ((a & 0x00FF) << 8 | (a >> 8));
|
||||
// }
|
||||
|
||||
// task 3
|
||||
// int main(void) {
|
||||
// int a = 10;
|
||||
// int b = 5;
|
||||
// int c = a / b;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
// task 4
|
||||
// int multi(int x){
|
||||
// return x * 2;
|
||||
// }
|
||||
|
||||
// int main(void) {
|
||||
// multi(2);
|
||||
// }
|
||||
// task 5
|
||||
// int main(void) {
|
||||
// int factorial = 1;
|
||||
// int x = 5;
|
||||
|
||||
// if (x < 0) {
|
||||
// printf("error\n");
|
||||
// } else {
|
||||
// for (int i = 1; i <= x; i++) {
|
||||
// factorial *= i;
|
||||
// }
|
||||
// printf("Факториал %d = %d\n", x, factorial);
|
||||
// }
|
||||
// return 0;
|
||||
// }
|
||||
Reference in New Issue
Block a user