Program Rotasi Nilai Terdepan ke Posisi Belakang - Larik / Array C/C++
Praktikum Larik / Array C/C++
Hasil running
#include<conio.h> #include<stdio.h> int main() { int bil[100], data, i, temp; printf ("Masukan jumlah data : "); scanf ("%d", &data); getch (); printf ("\n"); for(i = 0;i < data; i++) { printf ("Data yang dimasukan = "); scanf ("%d", &bil[i]); } temp = bil[0]; for (i = 1; i < data; i++) { bil[i-1] = bil[i]; } printf ("\n\nHasinya\n"); bil[i-1] = temp; for(i = 0; i < data; i++) { printf ("\n%d", bil[i]); } getch(); }
Hasil running
0 Response to "Program Rotasi Nilai Terdepan ke Posisi Belakang - Larik / Array C/C++"
Post a Comment