1. Trang chủ
  2. » Tất cả

84144662

2 3 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 2
Dung lượng 18,83 KB

Nội dung

#include #define MAXN 100 int getUserChoice() { int choice; printf("1- Add a value"); printf("\n2- Search a value"); printf("\n3- Print out the array"); printf("\n4- Print out values in a range"); printf("\n5- Print out the array in ascending order"); printf("\nOthers- Quit"); printf("\nChoose: "); scanf("%d", &choice); return choice; } void add(int x,int *a,int *n){ if (*n==MAXN) printf("Full\n"); a[*n]=x; (*n)++; } void function1(int *a, int *n){ int x; printf("Input: "); scanf ("%d",&x); add(x,a,n); printf("Added"); printf("\n========\n"); } int Search(int *a, int *n, int x) { int k=0; for (int i=0;i

Ngày đăng: 20/03/2021, 20:23

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN