Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kelompok_Belajar_Alstrudat
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Manurung
Kelompok_Belajar_Alstrudat
Commits
4718340c
Commit
4718340c
authored
Mar 14, 2019
by
Nicolas Manurung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Tutorial 1|Dynamic & Statis Array
parent
73799278
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
Tutorial 1|Dynamic & Statis Array
Tutorial 1|Dynamic & Statis Array
+0
-34
No files found.
Tutorial 1|Dynamic & Statis Array
deleted
100644 → 0
View file @
73799278
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
int i;
int s[5];
int n;
//statis
s[0] = 1;
s[1] = 2;
s[2] = 3;
s[3] = 4;
s[4] = 5;
for(i=0;i<5;i++){
printf("static ke-%d adalah %d\n",i+1,s[i]);
}
//dynamic
scanf("%d",&n);
int * d = (int *)malloc(sizeof(int)* n);
for( i = 0; i < n; i++ ){
printf("Masukkan Data ke-%d\n",i);
scanf("%d", &d[i]);
}
for(i=0;i<n;i++){
printf("static ke-%d adalah %d\n",i+1,d[i]);
}
return 0;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment