Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test examen
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int[] a = {2, 3, 4, 5, 6, 7, 8, 9, 10}; int[] a1 = {2, 3, 6, 7, 11}; static int is235Array(int[ ] a){ int nombreDiv = 0; int nombreNonDiv = 0; for (int i = 0; i < a.Length; i++){ if (a[i]%2 ==0 ) { nombreDiv++; } if ( a[i]%3 ==0 ) { nombreDiv++; } if (a[i]%5 ==0 ) { nombreDiv++; } else{ nombreNonDiv++; } } if ((nombreDiv + nombreNonDiv) == a.Length) { return 1;} else{return 0;} } }
run
|
edit
|
history
|
help
0
vera
sdcsvdfcsc
printing * in pyramid shape
45
Lab8
C++ lesson
Intuit // C# // listing_4.1 (Console.WriteLine _ Форматный вывод)
A
13
6