Computer Science, asked by soapmactavish7598, 5 months ago

Write a program to print your Name,Class,Roll_No,Marks and Age.Name this file,'MyProfile'.
Please solve this question without using the scanner method......

Answers

Answered by vabeshkumar1234
4

Answer:

import java.util.*;

class Myprofile

{

public static void main()

{

String name;

int class, Roll_no, marks, age;

Scanner sc=new Scanner(System.in);

Sysrem.out.println("Enter the name");

name=sc.nextLine();

Sysrem.out.println("Enter the Roll no");

Roll_no=sc.nextInt();

Sysrem.out.println("Enter the mark");

marks=sc.nextInt();

Sysrem.out.println("Enter the age");

age=sc.nextInt();

Sysrem.out.println("Name:"+name );

Sysrem.out.println("Roll no:"+Roll_no);

Sysrem.out.println("Marks:"+marks );

Sysrem.out.println("Age:"+age );

}

}

Explanation:

hope it helps........

Answered by chaharanshika
1

Answer:

This is your answer ☺️☺️

Explanation:

Please follow me

Mark has Brain List

Attachments:
Similar questions