Main { ifstream f; f open


Download 105.91 Kb.
Sana13.12.2022
Hajmi105.91 Kb.
#999125

8-variant
Berilgan nomdagi matnli faylni yaratish va unga matn kiritish dasturini tuzing. Matndan eng qisqa so’zni toping.
#include
using namespace std;
int main()
{
ifstream f;
f.open("matn.txt");
char ch[100], ch1[100];
int min = ch[0];
while (!f.eof())
{
f >> ch;
if (min > strlen(ch))
{
min = strlen(ch);
strcpy(ch1, ch);
}
}
f.close();
cout << ch1;
}



input faylida A va B butun sonlari berilgan output fayliga bu sonlar orasida kelgan sonlarni yozish dasturini tuzing.
Download 105.91 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling