2006///for/ ¶
~cpp
#include <iostream>
using namespace std;
int main (void)
{
int p, n;
for (p = 1; p <= 5; p++) {
for (n = 1; n <= p; n++) {
cout << "*";
}
cout << endl;
}
cout << endl;
for (p = 1; p <= 5; p++) {
for (n = 1; n <= 6-p ; n++) {
cout << "*";
}
cout << endl;
}
return 0;
}
~cpp
#include <iostream>
using namespace std;
int main (void)
{
int f, factn, res = 1;
cin >> f;
if (f <= 10) {
for (factn = 1; factn <= f; factn++) {
res *= factn;
}
cout << res;
}
return 0;
}










