Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as C by registered user raphael ( 1 year ago )
// Auteur : Raphael De Oliveira
#include <iostream>
using namespace std;
void mafonction(int a, int b, int pas=1){
if(b<a){
int temp = a;
a = b;
b = temp;
}
for(int i=a; i<=b; i=i+pas){
cout<<i<<", ";
}
cout<<endl;
}
int main()
{
int a = 500;
int b = 320;
cout<<"Aucune valeur donné pour le pas : "<<endl;
mafonction(a,b);
cout<<"Pas de 5 : "<<endl;
mafonction(a,b,5);
return 0;
}
Revise this Paste