ایجاد شده در 11 سال پیش
این هم یه ماشین حساب ساده به زبان سی پلاس پلاس
//SoftAfzar.Net
#include
using namespace std;
int main()
{ long a,b,c,d,e,f,g,h,i,j,k,l,m,n; cout
ایجاد شده در 11 سال پیش
///////////////////////
// SoftAfzar.net //
///////////////////////
#include
#include
void main()
{ int len=0; char name[900]; cin.get(name,sizeof name) ; while(name[len]!='\0')len++; for(int i=len-1;i>=0;i--) { cout
ایجاد شده در 11 سال پیش
بعد از اجرای این برنامه شما این رو میبینید:
10
120
1230
120
10
#include
#include
void main(){
int i=1,j=1;
const k=3;
while(i
ایجاد شده در 11 سال پیش
این برنامه یه رشته از ورودی دریافت میکنه و مشخص میکنه که پالینرومه یا نه (پالیندروم عدد یا رشته ایه که اگر اون رو از هر طرف بخونی باز همون میشه مثل 12mm21)
#include
#include
#include
void main(){
char ch1[11],ch2[11];
int count=0,j=0;
cout
ایجاد شده در 11 سال پیش
این برنامه یک عدد دریافت میکنه و مشخص میکنه که اول هست یا نه
#include
#include
#include
void prime(int a)
{
bool flag1=true,flag2=false; if(a==2||a==3)
{ cout
ایجاد شده در 11 سال پیش
#include
#include
#include
int main()
{
int a,c;
char b;
randomize();
for (int i=0;i
ایجاد شده در 11 سال پیش
#include
#include
int sum(int x,int y)
{ int sum=0;
while(x>x>>y;
cout
ایجاد شده در 11 سال پیش
#include
#include
#include
void main()
{randomize();
do
{cout
ایجاد شده در 11 سال پیش
این برنامه ساده یه عدد از کاربر دریافت کرده و فاکتوریل اون رو نمایش میده
محاسبه فاکتوریل با تابع:
#include
#include
int fact(int x)
{
int f=1;
for(int i=1;i>x;
cout>x;
cout
ایجاد شده در 11 سال پیش
با این کد ساده میتونید یه جدول ضرب درست کنید
#include
#include
void main()
{ for(int i=1;i
ایجاد شده در 11 سال پیش
//////////////////
// SoftAfzar.net
// All the best!
//////////////////
#include
#include
int tavan(int x,int n)
{int y=1;
for(int i=1;i>;
coutt>>;
cout
ایجاد شده در 11 سال پیش
[align=left]
///////////////////////////////
//SoftAfzar.net
///////////////////////////////
#include
#include
void main()
{const count=10;int n[count];int hold;
cout