بـــرنــــامــــج₰👨💻👩💻₰❥
للبحث عن عدد في مصفوفة وطباعة عدد مرات وجود هذا الحرف؟
#include <iostream>
using namespace std;
int main (){
int x [ ]={1,3,5,8,1,9};
int e, h=0;
cout <<"enter number you need found : \n ";
cin >>e ;
for (int i =0 ; i <6 ; i++)
if (e == x [i]){
cout <<"found \n";
break ;}
for (int i =0 ; i <6 ; i++)
if (e == x [i])
h++;
cout <<"found number "<<e<<" = "<<h; }
المخـ₰💻₰❥ـرجات
enter number you need found :
1
found
found number 1 = 2
[Program finished]
للبحث عن عدد في مصفوفة وطباعة عدد مرات وجود هذا الحرف؟
#include <iostream>
using namespace std;
int main (){
int x [ ]={1,3,5,8,1,9};
int e, h=0;
cout <<"enter number you need found : \n ";
cin >>e ;
for (int i =0 ; i <6 ; i++)
if (e == x [i]){
cout <<"found \n";
break ;}
for (int i =0 ; i <6 ; i++)
if (e == x [i])
h++;
cout <<"found number "<<e<<" = "<<h; }
المخـ₰💻₰❥ـرجات
enter number you need found :
1
found
found number 1 = 2
[Program finished]
Forwarded from خاص بماده البـرمجه