# data[].attributes.body
//Q8 Aamogh Sharma
import java.util.*
class num3
{
void enter()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number");
int n=sc.nextInt();
int count=0;
double sum=0.0;
while(n>0)
{
if(n%3==0)
{count++;
sum+=n;}
System.out.println("Enter the number");n-sc.nextInt();}
System.out.println("Count is"+count);
System.out.println("Average is "+(sum/count));
}
}

# data[].attributes.body
//Zakia
import java.util.Scanner;
class examm
{
void main()
{
Scanner ob = new Scanner(System.in);
int s = 0;
System.out.println("Enter 1 to see a pattern");
System.out.println("Enter 2 to calculate the sum of 1+3+5....till 10th term");
int n= ob.nextInt();

switch(n)
{
case 1:
for(int i=1;i<=5;i++)
{
for(int j=5;j>=i;j--)
{
System.out.print(j +  " ");
}
Syste,.out.println();
}
break;
case 2:
for(int a =1;a<=20;a+=2)
{
s=s+a;}
System.out.println("Sum = " + s);
break;
default:
System.out.pritnln("you have entered wrong choice");
}}}

# data[].attributes.body
//MOHAK
import java.util.Scanner;
class examm
{
void main()
{
Scanner ob = new Scanner(System.in);
int s = 0;
System.out.println("Enter 1 to see a pattern");
System.out.println("Enter 2 to calculate the sum of 1+3+5....till 10th term");
int n= ob.nextInt();

switch(n)
{
case 1:
for(int i=1;i<=5;i++)
{
for(int j=5;j>=i;j--)
{
System.out.print(j +  " ");
}
Syste,.out.println();
}
break;
case 2:
for(int a =1;a<=20;a+=2)
{
s=s+a;}
System.out.println("Sum = " + s);
break;
default:
System.out.pritnln("you have entered wrong choice");
}}}

# data[].attributes.body
//Lalita
import java.util.*;
class Frequency
{
void main()
{
Scanner sc=new Scanner(System.in);
int number,i,count,digit,temp;
System.out.println("Enter any Number : ");
number=sc.nextInt();
System.out.println("Digit\tFrequency");
for(i=0;i<=9;i++)
{
count=0;
temp=number;
while(temp>0)
{
digit=temp%10;
if(digit==i)
{
count++;
}
temp=temp/10;
}
if(count>0)
{
System.out.println(i+"\t"+count);
}
}
}
}

# data[].attributes.body
//(MOHAK BISARIA)
import java.util.Scanenr;
class Niven_number
{
void main()
{
int s = 0;
int t = num;
While(t!=0)
{
int digit = t%10;
s=s+digit;
t=t/10;
}
if(num%s==0)
System.out.println("it is a Niven no.");
else
System.out.println("not a Niven no.");
}}

# data[].attributes.body
Question 4(Arnav)
import java.util.*;
class UserInputDemo.
{
public static void main()
{
Scanner sc= new Scanner(System.in);
System.out.print("Enter first number- ");
int monthlyincome= sc.nextInt();
double annualincome=monthlyincome*12,taxrate,healtheducation,nettax;
if(annualincome<=250000)
{
System.out.println("Net tax = Nil")
}
if(annualincome>=250000 && annualincome<500000)
{
taxrate=annualincome*5/100;
healtheducation=taxraate*4.0/100.0;
nettax=taxrate+healtheducation;
System.out.println("Annual Income ="+ annualincome);
System.out.println("Net Tax = "+ nettax)
}
if(annualincome>=500000 && annualincome<1000000)
{
taxrate=annualincome*5/100;
healtheducation=taxraate*4.0/100.0;
nettax=taxrate+healtheducation;
System.out.println("Annual Income ="+ annualincome);
System.out.println("Net Tax = "+ nettax)
}
if(annualincome>=1000000)
{
taxrate=annualincome*5/100;
healtheducation=taxraate*4.0/100.0;
nettax=taxrate+healtheducation;
System.out.println("Annual Income ="+ annualincome);
System.out.println("Net Tax = "+ nettax)
}
}
}