Write the c code to print your name,class and section (those who know only they should tell or report)
Answers
Answered by
1
public class PersonalData
{
public static void main(String args[])
{
System.out.println("Name : Mohd.Afham");
System.out.println("Class : 8");
System.out.println("Section : A");
}
}
This code is little different.
import java.util.*;
public class PersonalData
{
public static void main()
{
Scanner sc = new Scanner(System.in);
char a, b, c;
System.out.println("Name");
a = sc.next().charAt(0);
System.out.println("Class");
b = sc.next().charAt(0);
System.out.println("Section");
c = sc.next().charAt(0);
}
}
Mark Brainliest
Answered by
0
Above answer is correct................
Similar questions
Computer Science,
2 months ago
Hindi,
2 months ago
Hindi,
5 months ago
History,
5 months ago
English,
11 months ago