Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CiclosRepetitivos
- {
- public static void Main (string[] args)
- {
- int i=0,n=10;
- while (i<=n)
- {
- Console.WriteLine("10 primeros numeros enteros"+1);
- i++
- if (i%2==1)
- {
- Console.WriteLine ("Numeros impares"+i);
- i++; //Aumenta dos veces por iteración
- }
- }
- }
- }
- Console.ReadKey(); //Fuera de Main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement