
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Learn Python C# Online Compiler
Main.cs Output
// Online C# Editor for free // Write, Edit and Run your C# code using C# Online Compiler
//Rivas, Joy B. //BSIT III- //Write a program that prints on the console the numbers from 1 to N, which are not divisible by 3 and 7 simultaneously. The number N should be read from the standard input.
using System;
public class HelloWorld { public static void Main(string[] args) { Console.Write("Enter the value of N: " ); int N = int.Parse(Console.ReadLine());
for (int j = 0; j <= N; j++) if (j % 3 != 0 && j % 7 != 0) Console.WriteLine(j); } }
Run