Computer Science, asked by rabeea59, 1 year ago

what data type would you use to represent the following items? A) Number of children at your school. B) A letter grade on an exam. C) The average marks of your class. ​

Answers

Answered by Ashutosh6116
9

Answer:

A - character

B - character

C - integer or float

Answered by adventureisland
9

Answer:

We will use the following data type to represent these items.

A) A number of children at your school: We will use here long int as the data type since the number of children can be less or more depends on the school and it will be always in positive numbers so long int is the better option.

B) A letter grade on an exam: we will use char data type since letter grape will be alphabets and character data type is the best option here.

C) The average marks of your class: we will use here double data type since average marks can be in decimal and can long depend on the total marks and number of students. So double data type is a better option than the float data type.

Similar questions