Computer Science, asked by nirajsirohi, 4 months ago

Write the c code to print your name,class and section (those who know only they should tell or report)

Answers

Answered by sabaparveen180296
1

\huge\pink{\boxed{\blue{\boxed{\purple{\boxed{{\red{Systematic~Code}}}}}}}}

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");

}

}

\huge\pink{\boxed{\blue{\boxed{\purple{\boxed{{\red{Scanner~Code}}}}}}}}

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 jahaanafroz004
0

Above answer is correct................

Similar questions