C# Saved Program: peaceful-palace

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Threading.Tasks;

namespace TheOnlineCompiler
{
    class Program 
    {
        static void Main() 
        {
                    int size,i;
        Console.WriteLine("Enter the size of the list:");
        size=int.Parse(Console.ReadLine());
        int[] A=new int[size];
        for(i=0;i<size;i++)
        {
            A[i]=int.Parse(Console.ReadLine());
        }
        Console.WriteLine("Enter a number:");
        int num=int.Parse(Console.ReadLine());
        for(i=0;i<size;i++)
        {
            if(num<A[i])
            {
                Console.WriteLine(A[i]);
            }
        }
        }
    }
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs