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
9ddff55c
Commit
9ddff55c
authored
Mar 12, 2019
by
Nicolas Manurung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tutorial_1
parent
0b6b65b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
tutorial_1
tutorial_1
+35
-2
No files found.
tutorial_1
View file @
9ddff55c
#include
\ No newline at end of file
#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;
}
\ No newline at end of file
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