Generation

generate functionFri, 31 Mar 2023

انشاء برنامج باستخدام السجلات لادخال ببانات 10 اشخاص مع ارقامهم ورواتبهم ويظهر للمستخدم رسائل توضحية للاختيار دالة الادخال دالة الطباعة دالة للبحث داخل السجل دالة للترتيب حسب الاكبر

#include <iostream> #include <string> using namespace std; struct Person { string name; int id; int salary; }; int main() { int count; cout << "Enter number of people\n"; cin >> count; Person people[count]; for (int i=0; i < count; i++) { cout << "Enter id, name, salary\n"; cin >> people[i].id >> people[i].name >> people[i].salary; } for (int i=0; i < count; i++) { cout << people[i].id << " " << people[i].name << " " << people[i].salary << "\n"; } }

Want to kickstart your project?Use the new AI Studio to create your code