Advertisement
anizko

01. Numbers Ending in 7

Apr 10th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. using System;
  2.  
  3. namespace loop_for
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             for(int i=1;i<=1000;i++)
  11.             {
  12.                 if (i == 7 || i % 10 == 7)
  13.                 {
  14.                     Console.WriteLine(i);
  15.                 }
  16.             }
  17.  
  18.  
  19.            
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement