Skip to content

Commit

Permalink
feat: std
Browse files Browse the repository at this point in the history
  • Loading branch information
mizzcode committed Dec 27, 2023
1 parent 779df6e commit 13a1ff6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions array/sum.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <iostream>
using namespace std;

int nilai_siswa [] = {75,80,77,91,63}; // init array
int n, result = 0;
Expand All @@ -10,9 +9,9 @@ int main ()
{
result += nilai_siswa[n];

cout << "Nilai siswa ke-" << n+1 << ": " << nilai_siswa[n] << endl;
std::cout << "Nilai siswa ke-" << n+1 << ": " << nilai_siswa[n] << std::endl;
}

cout << "Total seluruh nilai siswa adalah " << result << endl;
std::cout << "Total seluruh nilai siswa adalah " << result << std::endl;
#include "test.h"
}

0 comments on commit 13a1ff6

Please sign in to comment.