herrDeng網內搜尋

自訂搜尋

Ads

2017年3月7日 星期二

ex2 基本int輸入輸出與dev C++ 5.11




輸入n=5

輸出如下:
1
12
123
1234
12345

27 則留言:

B10333070 徐承瑋 提到...

include <iostream>

using namespace std;

int main()
{
int n;
cin >> n;
for(int i=1;i<=n;i++)
{
for (int j=1;j<=i;j++)
cout<<j;
cout<<endl;
}
system("pause");
return 0;
}

B10333107-曾詠浩 提到...

#include <iostream>

using namespace std;

int main()
{
int n;
cin>>n;
cout<<n<<endl;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333027毛冠霖 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

b10233032謝翔宇 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop
system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<'i';
cout<<endl;
}
system("pause");
return 0;
}

B10333063 羅胤銓 提到...

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333081曹正諭(正版) 提到...

#include <iostream>
#include <cstdlib>>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333077潘家銘 提到...

#include <iostream>
#include <cstdlib>
using namespace std;

int main(int argc, char** argv)
{
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1;i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333083 周琬芸 提到...

#include <iostream>
#include<cstdlib>
using namespace std;;
/* run this program sing the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin >> n;
for (int j = 1; j <= n; j++)
{
for (int i = 1; i <= j; i++)
cout << i;
cout << endl;
}
system("pause");
return 0;
}

B10333106 劉郁芃 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this progrom using the console pauser or add your own getch,
system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333086 陳晏堂 提到...

#include<iostream>
#include<cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch,
system("pause") or input loop*/

int main(int argc, char** argv) {
int n;
cin >> n;
cout << n << endl;
for (int j = 1; j<= n; j++)
{
for (int i = 1; i <= j; i++)
cout << i;
cout << endl;
}
system("pause");
return 0;
}

B10333064王韻菱 提到...

#include <iostream>
#include <cstdlib>
using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333005 陳於農 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<i;
cout<<endl;
}


system("pause");
return 0;
}

B10333072 黃玟茜 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch,
system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333094 提到...

#include <iostream>
#include <cstdlib>
using namespace std;


int main(int argc, char** argv) {
int n;
cin>>n;

for(int j=1; j<=n; j++)

{
for(int i=1; i<=j ;i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333055 翁恩義 提到...

#include <iostream>
#include <cstdlib>

using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv)
{
int n;
cin>>n;

for(int j=1;j<=n;j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

B10333079 葉禮魁 提到...

#include <iostream>
#include <cstdlib>
using namespace std;

int main(int argc,char** argv)
{
int n;
cin>>n;

for(int j=1 ; j<=n ; j++)
{
for(int i=1; i<=j ; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;

}

b10333097胡聖恩 提到...

#include <iostream>
#include <cstdlib>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;
}

b10333080 提到...

#include <iostream>
#include <cstdlib>

using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {

int n;
cin>>n;
cout<<n<<endl;

for(int i=1;i<=n;i++)
{

for(int j=1;j<=i;j++)
cout<<j;
cout<<endl;
}


system("pause");
return 0;
}

B10433053謝肇安 提到...

#include <iostream>

using namespace std;

int main(int arc, char** argv){
int n;
cin>>n;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;

}

B10433038詹恭煒 提到...

#include <iostream>

using namespace std;

int main(int arc, char** argv){
int n;
cin>>n;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;
}
system("pause");
return 0;

}

B10333053 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<i;
cout<<endl;
}


system("pause");
return 0;
}

B10333053 梁竣翔 提到...

#include <iostream>
#include <cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int n;
cin>>n;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<i;
cout<<endl;
}


system("pause");
return 0;
}

B10333142 提到...

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {

int n;
cin>>n;
cout<<n<<endl;
for (int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<'$';
cout<<endl;
}
system("pause");
return 0;

}

B10433156 提到...

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */


int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1;j<=n;j++)
{
for(int i=1;i<=j;i++)
cout<<j;
cout<<endl;
}
return 0;
}

B10333001黃子安 提到...

#include <iostream>
#include<cstdlib>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop
system("pause") or input loop */
int main(int argc, char** argv) {
int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n;j++)
{
for(int i=1; i<=j; i++)
cout<<'i';
cout<<endl;

}
system("pause");
return 0;

}

b10133187 楊鈞文 提到...

#include <iostream>
#include <cstdlib>


using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop
system("pause") or input loop */
int main(int argc,char** arcgv){

int n;
cin>>n;
cout<<n<<endl;
for(int j=1; j<=n; j++)
{
for(int i=1; i<=j; i++)
cout<<i;
cout<<endl;


}
system("pause");
return 0;
}

B10333089 游智翔 提到...

include <iostream>

using namespace std;

int main()
{
int n;
cin >> n;
for(int i=1;i<=n;i++)
{
for (int j=1;j<=i;j++)
cout<<j;
cout<<endl;
}
system("pause");
return 0;
}

Related Posts Plugin for WordPress, Blogger...

熱門文章