简体中文
Telegram

讨论串 Pls solve tha program in java..

3 条消息 · –
P
Pls solve tha program in java.. Even/odd no's between given range
  1. K
    import java.util.Scanner; public class EvenRange { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter staring value: "); int start = sc.nextInt(); System.out.print("Enter ending value: "); int end = sc.nextInt(); for (int i = start; i <= end; i++) { if (i % 2 == 0) { System.out.println(i); } } } } For odd numbers, reverse the condition in the if statement.

来自搜索索引的公开信息流 ChatCrawler ——“公开 Telegram 的 Google”;随着该社群被抓取而更新。 时间为 UTC。

仅限公开内容,使用 Telegram 官方 API。 关于 · 常见问题 · 索引限制 · 移除页面 · 目录 · 搜索 · 计算方法