#include <iostream.h>
int main(){
int n,i;
float x,small,big;
cout<<"Enter the value of N: ";
cin>>n;
cout<<"Enter a number: ";
cin>>small;
for(i=1;i<=n-1;++i)
{
cout<<"Enter next: ";
cin>>x;
if(x<small)small=x;
if(x>big)big=x;
}
cout<<"small: "<<small<<endl<<"big: "<<big;
return 0;
}
سلام. من یه برنامه می خواستم که عددی در مبنای 10 رو از ورودی دریافت کنه و معدل دودویی اون رو به خروجی ببره
خیلی فوریه![]()
#include "iostream.h"
void main()
{
int y;
cout<<"Enter ur number(less than 7): ";
cin>>y;
if (y==1) cout<<"saturday";
else
if (y==2) cout<<"sunday";
else
if (y==3) cout<<"monday";
else
if (y==4) cout<<"tuesday";
else
if (y==5) cout<<"wednesday";
else
if (y==6) cout<<"thursday";
else
if (y==7) cout<<"friday";
else
cout<<"wrong Entry!!";
}
////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#include "iostream.h"
void main()
{
int y;
cout<<"Enter ur number(less than 7): ";
cin>>y;
switch (y){
case 1:
cout<<"saturday";
break;
case 2:
cout<<"sunday";
break;
case 3:
cout<<"monday";
break;
case 4:
cout<<"tuesday";
break;
case 5:
cout<<"wednesday";
break;
case 6:
cout<<"thursday";
break;
case 7:
cout<<"friday";
break;
}
}
هی آرش چطوری؟ تو کجا اینجا کجا؟
توی تالار سریالها پلاس هستمسلام
ممممنون شما و از این طرفا ؟
[LEFT]//in the name of god
#include <iostream.h>
#include <conio.h>
int main()
{
int times,j,i;
clrscr;
gotoxy(25,3);
cout <<"In the name of God"<<endl;
gotoxy(22,5);
cout <<"Seyyed Hossein hasan pour\n";
for (i=1;i<=10;i++){
for (j=1;j<=10;j++)
cout <<i<<"*"<<j<<"="<<i*j<<"\n";
cout <<"\t";}
getch();
return 0;
}[/LEFT]