Skip to content

Instantly share code, notes, and snippets.

@internetova
Created November 18, 2020 16:58
Show Gist options
  • Save internetova/ea638c992797f2f2978cfb7d630b6b91 to your computer and use it in GitHub Desktop.
Save internetova/ea638c992797f2f2978cfb7d630b6b91 to your computer and use it in GitHub Desktop.
void main() {
// Задание 4
// Создать Map телефонных номеров с именем numberBook и типом данных (“имя”: “номер телефона”), заполнить данными: Иван: 2264865, Татьяна: 89523366684, Олег: 84952256575.
// Вывести на экран весь телефонный справочник numberBook.
// Вставить новый номер в карту: Екатерина: 2359942
var numberBook = <String, int>{
'Иван': 2264865,
'Татьяна': 89523366684,
'Олег': 84952256575,
};
print(numberBook);
numberBook['Екатерина'] = 2359942;
for (var entry in numberBook.entries) {
print('${entry.key}: ${entry.value}');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment