Write a program to accept the starting and ending range. Display the sum of even and odd numbers . import java.util.Scanner; public class Range { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("Enter the starting and ending range:"); int m = sc.nextInt(); int n = sc.nextInt(); if(m<n){ int so=0,se=0; for(int i=m;i<=n;i++) { if(i%2==0) { se=se+i; ...
Solved PYQs, Programs, Circuits & Guides