//#include<iostream.h>
//#include<string.h>
//#include<iomanip.h>
//void main()
//{
/* int v[5]={3,2,5,6,8};
int *ptr,*ptr1;
ptr=v;
cout<<ptr<<endl;
cout<<v[0]<<endl;
cout<<*ptr<<endl;
cout<<v[0]<<endl;
ptr+=2;
cout<<*ptr<<endl;
ptr1=&v[0];*/
// cout<<ptr-ptr1<<endl;
/*int v[5]={3,2,5,6,8};int *ptr,*ptr1;ptr=v;
cout<<v[3]<<endl;
cout<<*ptr<<endl;
cout<<*(v+3)<<endl;
cout<<ptr[3]<<endl;*/
// ptr+=3;
/* char *p[3]={"abc","klmno","xyz"};
cout<<*p<<endl;
cout<<*(p+1)<<endl;
cout<<*(p+2)<<endl;*/
/* char *str1="abc";
char *str2=new char[80];
cin>>str2;
cout<<str2<<endl;
cout<<*str2<<endl;
cout<<&str2<<endl;
cout<<str1<<endl;
cout<<*str1<<endl;
//strcmp (str2,str1);
cout<<str2<<endl;
cout<<strcmp<<endl;*/
//if(str1=str2)
//return 0;
//if(str1>str2)
//return 1;
//if(str1<srt2)
//return-1;
//}
/*#include <iostream.h>
#include<iomanip.h>
struct data{
int day;
int mounth;
int year;
};
void main()
{
data f;
cin>>f.day;
cin>>f.mounth;
cin>>f.year;
cout<<setfill('0');
cout<<setw(2)<<f.day<<"/"<<setw(2)<<f.mounth<<"/"<<f.year<<endl;
}*/
/*struct time{
int hour;
int minute;
int second;
};
void printuniversal(const time&);
void printstandard(const time&);
int main()
{
time dinnertime;
dinnertime.hour=18;
dinnertime.minute=30;
dinnertime.second=0;
cout<<"dinner will be held at ";
printuniversal(dinnertime);
cout<<"universal time,\nwhich is";
printuniversal(dinnertime);
cout<<"standard time.\n";
dinnertime.hour=29;
dinnertime.minute=73;
cout<<"\ntime with invalid values";
printuniversal(dinnertime);
cout<<endl;
return 0;
}
void printuniversal (const time &t)
{
cout<<setfill('0')<<setw(2)<<t.hour<<":"<<setw(2)<<t.minute<<":"<<setw(2)<<t.second;
void printstandard(const time &t)
{
cout<<((t.hour==0||t.hour==12)?12:t:hour%12)<<":"<<setfill('0')<<setw(2)<<t.mionute<<setw(2)<<t.second<<(t.hour<12?"am":"pm");
}
}*/
/*int comprise(char s1[],char s2[])
{
int k,j;
for (int i=0;s1!='\0';i++)
for(int j=0;s2[j]!='\0';i++)
if(i<j)
k=i;
else
k=j;
for(int l=0;l<k;l++)
{
if(s1[l]>s2[l])
return 1;
if(s1[l]<s2[l])
return -1;
}
if(i==j)
return 0;
if(i>j)
return 1;
else
return -1;*/
/*int *x,y;
x=&y;
cin>>*x;
*x+=5;
cout<<*x;
cin>>y;
x=&y;
cout<<*x;*/
/*void f(const int *);
void main()
{
int y;
f(&y);
}
void f(const int *xptr)
{
*xptr=100; ãÄÔÑ ÛíÑ ËÇÊ Úáì ãÚØíÇÊ ËÇÈÊÉ*/
/* void main()
{
int x,y;
int *const ptr =&x;
*ptr=7;*/ //ãÄÔÑ ËÇÈÊ Çáì ãÚØíÇÊ ËÇÈÊÉ
/*void main()
{
int x=5,y;
const int *const ptr=&x;
cout<<*ptr<<endl;
// *ptr=7;
// ptr=&y;*/
//}
/*#include<iostream.h>
#include<string.h>
struct stud
{
char name[35];
double avg;
};
struct list
{
stud data;
list *next;
};
void create(list *first)
{
list *ptr;
int n;
cin>>n;ptr=new list;
first=ptr;
cin.getline(ptr->data.name,35,'\n');
cin>>ptr->data.avg;
for(int i=0;i<n-1;i++)
{
ptr->next=new list;
ptr=ptr->next;
cin.getline(ptr->data.name,35,'\n');
cin>>ptr->data.avg;
}
ptr->next=NULL;
}
void sort(list *first)
{
list *a,*b;
stud temp;
a=first;
while(a->next!=NULL)
{
b=a->next;
while(b!=NULL)
{
if(a->data.avg<b->data.avg)
{
temp=a->data;
a->data=b->data;
b->data=temp;
}
b=b->next;
}
a=a->next;
}
}
void insert()
{
list *a,*b,*ptr;
ptr=new list;
cin.getline(ptr->data.name,35,'\n');
cin>>ptr->data.avg;
b=first;
while(b!=NULL&&ptr->data.avg<b->data.avg)
{
a=b;
b=b->next;
}
if(b=first)
{
ptr->next=first;
first=*ptr;
}
else
{
a->next=ptr;
ptr->next=b;
}
}
void delete(list *first)
{
list*a,*b;
char sname[35];
bool f=false;
cin.getline(sname,35,'\n')
while(b!=NULL&& !f)
if(strcmp(b->data.name,sname)==0)
{
a=b;
a=b->next;
}
if(f)
{
if(b==first)
first=first->next;
else
a->next=b->next;
delete[]b;
}
else
cout<<"not found"<<endl;
}
void print(list* first)
{
list *ptr;
ptr=first;
{
cout<<ptr->data.name<<endl;
cout<<ptr->data.avg<<endl;
ptr=ptr->next;
}
while(ptr!=NULL)
}
void main()
{
}*/ارجو ان تنال اعجابكم