求一幅画的最大值及其在 C 中的位置
该程序在 C.#include #include int main() { int 最大,position, 长度=10; int tab[10]={1,2,3,4,5,6,7,8,9,10跨度>}; max=0跨度>; 为 (int i=0 ;我<长度;i++) { if(tab[i]>max){ max=制表符[i]; position=i; } } printf(最大值 : %d\n位置: %d\n”,max,位置); 返回 0; } |
#include #include int main() { int 最大,position, 长度=10; int tab[10]={1,2,3,4,5,6,7,8,9,10跨度>}; max=0跨度>; 为 (int i=0 ;我<长度;i++) { if(tab[i]>max){ max=制表符[i]; position=i; } } printf(最大值 : %d\n位置: %d\n”,max,位置); 返回 0; } |