需要帮助才能编写程序 [英] need help to write a program

查看:72
本文介绍了需要帮助才能编写程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮帮我怎样才能得到输出?

1

12

123

1234

123

12

1

如果我使用C ++数组和下一个qusestion是如何从中搜索一个整数二维数组?

please help me how could i get the output ?
1
12
123
1234
123
12
1
if i m using C++ array and next qusestion is how can i search an integer from two dimensional array?

推荐答案


请帮帮我怎样才能得到输出?

1

12

123

1234

123

12 br / >
1

如果我使用C ++数组和下一个qusestion是如何从二维数组中搜索整数?
please help me how could i get the output ?
1
12
123
1234
123
12
1
if i m using C++ array and next qusestion is how can i search an integer from two dimensional array?





你必须使用两个for循环才能显示这些输出。


for循环可以是: -


for(i = 1; i< 5; i ++)

for(j = 1; j< = i; j ++)

print(j)


并且在2D数组中搜索一个整数,你可以再次使用两个for循环。

Hi,
You have to use two for loops to display these kind of output.

the for loops can be:-

for( i=1; i<5; i++)
for( j=1; j<=i; j++)
print ( j )


and to search a integer in an 2D array u hve to use again two for loops.



请帮帮我怎样才能得到输出?

1

12

123

1234

123

12

1

如果我使用C ++数组和下一个qusestion是如何从二维数组中搜索一个整数?
please help me how could i get the output ?
1
12
123
1234
123
12
1
if i m using C++ array and next qusestion is how can i search an integer from two dimensional array?



karan是真的我会帮你找到2D数组中的一个整数

你要写2 for for循环和if if like那个


int搜索;


for(int i; i< size; i ++)

for(int j; j< size; j ++)

if(array [i] [j] == search)

返回0;


可以...

karan is true i would help you about finding a integer from the 2D arrays
you shold write 2 for loops and a if state like that

int search;

for(int i;i<size;i++)
for(int j;j<size;j++)
if(array[i][j]==search)
return 0;

can be...



karan是真的我会帮你找到2D数组的整数

你要写2 for for循环和if if状态


int search;


for(int i; i< size ; i ++)

for(int j; j< size; j ++)

if(array [i] [j] == search)

返回0;


可以...
karan is true i would help you about finding a integer from the 2D arrays
you shold write 2 for loops and a if state like that

int search;

for(int i;i<size;i++)
for(int j;j<size;j++)
if(array[i][j]==search)
return 0;

can be...



感谢帮助,但有一点我忘记了提到我跟着这个方法,但它没有做....并且总是给输出没有发现这个程序表现得很糟糕

可以你告诉我从第一件事到最后我的意思是从#include< iostream.h> .........到.......... getch();}

我非常感谢你,请尽快回复我,再次感谢

thanks for helping but one thing that i''ve forget to mention that i m following this method but it''s not doing....and always give output not found this program is behaving miserably
can u tell me this from the first thing to the end i mean from #include<iostream.h>.........to ..........getch();}
i''ll very thankful to u please reply me as soon as possible thanks alot again


这篇关于需要帮助才能编写程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆