Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class p2 {
- public static void main(String[] args) {
- int i = 1;
- while ( i <= 100) {
- if(i % 3 == 0 && i % 5 == 0) {
- System.out.println("Programacion 1");
- }else if(i % 3 == 0) {
- System.out.println("progra");
- }else if(i % 5 == 0) {
- System.out.println("Macion");
- }else {
- System.out.println(i);
- }
- i ++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement