課程
/后端開發(fā)
/C#
/C#開發(fā)輕松入門
VS2015都通過(guò)了,這里卻通不過(guò)??這是為何?
2016-01-25
源自:C#開發(fā)輕松入門 5-8
正在回答
vs可以通過(guò),說(shuō)明代碼沒問(wèn)題??!但是這個(gè)網(wǎng)頁(yè)的答案,是有要求格式的
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? //聲明整型數(shù)組,保存一組整數(shù)
? ? ? ? ? ? int[] num = new int[] { 3,34,43,2,11,49,30,55,20};
? ? ? ? ? ? bool hasSeven=false;
? ? ? ? ? ? for(int i=0;i<num.Length;i++){
? ? ? ? ? ? ? ? if(num[i]%7==0){
? ? ? ? ? ? ? ? ? ? hasSeven=true;
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? if(hasSeven==true){
? ? ? ? ? ? ? ? ? Console.Write("有7的整倍數(shù)");
? ? ? ? ? ? ? ? ?
? ? ? ? ?
? ? ? ? ? ??
? ? ? ? ? ? ? ?else{
? ? ? ? ? ? ? ? ?Console.Write("沒有7的整倍數(shù)");
? ? ? ? ? ? ? ??
? ? ? ? ? ? //請(qǐng)完善代碼,判斷數(shù)組中有沒有7的整倍數(shù)
? ? ? ? }
? ? }
讓我看一下你VS中的代碼吧。
舉報(bào)
本門課程是C#語(yǔ)言的入門教程,將帶你輕松入門.NET開發(fā)
1 回答VS2015可以通過(guò),這里無(wú)法通過(guò)?
1 回答提交不通過(guò)
3 回答本機(jī)VS 運(yùn)行通過(guò) mock 上面提交不了 囧
2 回答為什么我直接提交就通過(guò)了?
1 回答在VS上編碼沒啥問(wèn)題,但是提交作業(yè)不通過(guò)。
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-11-27
vs可以通過(guò),說(shuō)明代碼沒問(wèn)題??!但是這個(gè)網(wǎng)頁(yè)的答案,是有要求格式的
2016-02-03
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? //聲明整型數(shù)組,保存一組整數(shù)
? ? ? ? ? ? int[] num = new int[] { 3,34,43,2,11,49,30,55,20};
? ? ? ? ? ? bool hasSeven=false;
? ? ? ? ? ? for(int i=0;i<num.Length;i++){
? ? ? ? ? ? ? ? if(num[i]%7==0){
? ? ? ? ? ? ? ? ? ? hasSeven=true;
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? if(hasSeven==true){
? ? ? ? ? ? ? ? ? Console.Write("有7的整倍數(shù)");
? ? ? ? ? ? ? ? ?
? ? ? ? ? ? }
? ? ? ? ?
? ? ? ? ? ??
? ? ? ? ? ? ? ?else{
? ? ? ? ? ? ? ? ?Console.Write("沒有7的整倍數(shù)");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? ? ??
? ? ? ? ? ? //請(qǐng)完善代碼,判斷數(shù)組中有沒有7的整倍數(shù)
? ? ? ? ? ??
? ? ? ? }
? ? }
2016-01-26
讓我看一下你VS中的代碼吧。