Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. using System;
  2. namespace CiclosRepetitivos
  3. {
  4. public static void Main (string[] args)
  5. {
  6. int i=0,n=10;
  7. while (i<=n)
  8. {
  9. Console.WriteLine("10 primeros numeros enteros"+1);
  10. i++
  11. if (i%2==1)
  12. {
  13. Console.WriteLine ("Numeros impares"+i);
  14. i++; //Aumenta dos veces por iteración
  15. }
  16. }
  17. }
  18. }
  19. Console.ReadKey(); //Fuera de Main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement