Computer Science, asked by priyambadasuin, 8 months ago

WAP to take a string as input and find if any digits are present or not. Input : Anaconda Output : No digits are present Input : Anac1on6da9 Output : Digits are present​

Answers

Answered by naman6572
0

Answer:

sanjoy7766

sanjoy7766

15.01.2020

Computer Science

Secondary School

+5 pts

Answered

WAP

of

to

even

input a number . Display the product of the successor

digits of the number entered

Input: 2745

Output:15

2

SEE ANSWERS

Log in to add comment

Answers

ganeshsprajapati

ganeshsprajapati Ambitious

Answer:

6ub the runnel a good day I extend the runnel a good day I extend the runnel a good day 556

1.0

1 vote

THANKS

0

Comments Report

ridhimakh1219 Ambitious

Write a program to input a number.Display the product of the successors of even digits of the number entered

Explanation:

Java Program

import java.util.*;

public class product

{

public static void main()

{

Scanner sc=new Scanner(System.in);

int n,r,p=1;

System.out.println("Enter a number"); // Input number

n=sc.nextInt();

while(n!=0)

{

r=n%10;

n=n/10;

if(r%2==0)

{

System.out.println("\n"+"Even digit = "+r);

System.out.println("Its successor = "+(r+1)+"\n");

p = p * (r+1);

}

}

System.out.println("\n"+"The product of successors of the digit is "+p);

}

}

Output

Enter a number 2745

Even digit =

2

4

The product of successors of the digit is :3*5=15

Similar questions