1樓:匿名使用者
#includeusing namespace std;int main()大段枯概意思沒錯不過我沒編譯器直接寫的,你執行看看,應該沒錯誤,有的話相信你能自己修改;:)
2樓:匿名使用者
main() printf("你輸入數態脊局的各位數野搏字之帆讓和為:%d",sum);}
3樓:匿名使用者
bleak sky 的程式忘了轉換整形了。#include《逗慶iostream>using namespace std;int main()
編寫程式,輸出整數152的個位數字,10位數字和百位數字的值。
4樓:
摘要。編寫程式,輸出整數152的個位數字,10位數字和百位數字的值。int main()
編寫程式,輸出整數152的個位數字,10位數字和百位數字的值。
編寫程式,輸出整數152的個位數字,10位數字和百位數字的值。int main()
錯了?152 = 個位數字 + 十位數字10 + 百位數字100 #includeintmain()
編寫程式,功能:已每行5個數字來輸出300以內能被7或17整除的偶數,並求出其和!急!!!
5樓:一嘆
300以內能被7或者17整除的偶數為 272 280 294。
程式的**:
#include <
int main()
int j=0,sum=0;
for (int i=0;i<=300;i+=2){j++;sum+=i;
printf("%d ",i);
if(j>0 &&j%5==0){
printf("");
printf("300以內能被7或17整除的偶數的和:%d",sum);
6樓:海天盛
1.首先編寫下面的程式。
2.if (i % 3 = = 0 & i % 5!)= 0)system . " total number: "+ j);}
5.public static void main(string args) {int j = 0; for (int i = 1; i < 100; i {+
6.最後,結果如下圖所示。
用delphi7編寫程式。任一輸入整數,判斷整數的
1 使用mod判斷餘數,如果為1則為奇數,否則為偶數2 示例如下回 procedure tform1.btn1click sender tobject varnb integer begin nb strtoint edt1.text if nb mod 2 1 thenbegin showmess...
用c語言編寫一程式,使用者輸入日期,計算該日是今年的第幾天
include stdio.h include stdlib.h intmain intday,month,year,sum,leap printf npleaseinputyear,month,day n switch month 先計算某月以前月份的總天數 case1 sum 0 break c...
編寫C控制檯應用程式,對於輸入的正整數n,計算
用遞zhi歸,這類題很好算 dao啊 using system class test public static int jiecheng int n public static int jiejia int n 編寫一個c 控制檯應用程式,對於輸入的正整數n,計算1 2 3 n 的值並輸出結果!要...