This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int i = 1, x, y; | |
cout<<"\n Masukkan angka kelipatan : "; cin>>y; | |
cout<<"\n Masukkan angka batas : "; cin>>x; | |
while (i <=x) { | |
if( i % y !=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
int ipa; | |
int rata; | |
int ips; | |
int mtk; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package FizzBuzz; | |
import java.util.Scanner; | |
public class FizzBuzz { | |
public static void main(String[] args) { | |
Scanner s=new Scanner(System.in); | |
System.out.println("Input Number:"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package magicsquare; | |
import java.util.Scanner; | |
public class MagicSquare { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.print("Input bilangan ganjil: "); | |
int n = input.nextInt(); |