In an election, there are candidates X and Y. On the election day, 80℅ of the voters go for polling, out of which 60℅ vote for X. Write a java program to take the number of votes as input and calculate :
i) number of votes X get
ii) number of votes Y get
Answers
Answered by
47
Answer:
class voter
{
public static void main(int n)
{
int p,x,y;
p=(80*n/100;
system.out.println(No. of voters go for polling=+p);
x=(60*p)/100;
system.out.println(no. of voters go for X=+x);
y=p-x;
system.out.println(No. of voters go for Y=+y);
}
}
Explanation:
Answered by
1
Answer:
this is full answer . here we take scanner class for this answer
Attachments:
Similar questions
Math,
5 months ago
Math,
5 months ago
Social Sciences,
10 months ago
Math,
10 months ago
Math,
1 year ago