cfree笔记1计算1210之和includemainintisumsum0存放累加变量必须先赋0值i1whileisumsumiiprintf1210dsum函数实现参照下面阶乘2阶乘includemainintinsumprintf请输入一个数scanfdampnsum1fori1isumsumiprintfdsum函数实现重要includeintfactintnintit1fori1ittireturntintmainintnresultprintf请输入一个数scanfdampnresultfactnprintfdresult计算1210includemainintijlongtsumsum0fori1it1forj1jttjsumsumtprintfdsum3字符输入1234charcforcgetchargetcharcgetcharputcharc结果13forcgetcharccgetcharputcharc结果1234forcgetcharcgetcharcgetcharputcharc结果244输入10个整数找出最大值和最小值重要includemaininta10intimaxminfori0iscanfdampaimaxmina0fori0iifmaxmaxaiifminaiminaiprintfmaxdmindmaxmin4一维数组输入5个数找到最大值的位置求平均值计算这5个数的和includemaininta5b5ijkfloatsum0avefori0iscanfdampaik0fori0iifakkiforj0jsumsumajavesum5printfmaxd位置d平均f和fakkavesum二维数组求一个二维数组的最大元素以及其所在的行和列includemainintijmaxinta34fori0iforj0jscanfdampaijmaxa00fori0iforj0jifmaxmaxaijfori0iforj0jifaijmaxprintfmaxdrowdcolumdaijij俩个数组相加includemaininta23b23c23ijfori0iforj0jscanfdampaijfori0iforj0jscanfdampbijfori0iforj0jcijaijbijfori0iforj0jprintfdcijprintf5排序选择法排序includemaininta6ijintloctempfori0iscanfdampaiprintfbeforsortingfori0iprintf5daiforj0jlocjforij1iifaialoclocitempajajalocaloctempprintfaftersortingfori0iprintf5dai冒泡法排序includemaininta6ijintloctempfori0iscanfdampaiprintfbeforsortingfori0iprintf5daiforj0jfori0iifaiai1tempaiaiai1ai1tempprintfaftersortingfori0iprintf5dai6字符串连接includeintmainvoidaddcharstr1charstr2charstr3chars1100chars2100chars3200printfinputstr1scanfss1printfinputstr2scanfss2adds1s2s3printfTheaddstringisss3getchargetcharvoidaddcharstr1charstr2charstrintiintjfori0str1i0istristr1iforj0str2j0jstrijstr2jstrij0删除includemaininta6ijxlocfori0iscanfdampaiscanfdampxfori0iifaixlociforjlocjajaj1fori0iprintf5dai字符数组的输入与输出逐个字符的输入与输出charstr5fori0iscanfcampstrifori0iprintfcstri以字符串的形式输入输出includemaincharstr5scanfsstrprintfsstr素数的判定intfunintnintilimitifnreturn0ifn2return1ifn20return0limitsqrtnfori3iifni0return0return1每行输出10个数最重要的两句Ifcount100Printf选择题请大家多看看书因为我还没复习到指针但我会尽快把指针的笔记整理出来