mahyar adli
یک شنبه 02 دی 1403, 00:28 صبح
با سلام لطفا به من کمک کنید تا این برنامه c++ را به c تبدیل کنم. سپاسگذارم
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
char ch,a;
int count=0;
cout<<"enter character that you whant to count:";
cin>>ch;
while(cin.get(a))
{
if(a==ch)
++count;
}
cout<<count<<ch<<"'s were counted.";
getch();
return 0;
}
//>
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
char ch,a;
int count=0;
cout<<"enter character that you whant to count:";
cin>>ch;
while(cin.get(a))
{
if(a==ch)
++count;
}
cout<<count<<ch<<"'s were counted.";
getch();
return 0;
}
//>