using System;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            Console.WriteLine("Hello world!");
            int[] inputTemps= {73,74,75,71,69,72,76,73};
            //int[] inputTemps= {73,74,75,71,76,72,77,73};
            int[] answer = new int[inputTemps.Length];
            bool noTempGreater = false;
            for(int i=0;i<inputTemps.Length;i++){
                int countDays = 1;
                Console.WriteLine("Value of i {0}", i);
                if(i<inputTemps.Length-1){
                    if(inputTemps[i]>inputTemps[i+1]){
                        Console.WriteLine("Count days when loop starts {0}", countDays);
                        for(int j=i+1; j<inputTemps.Length;j++){
                            if(inputTemps[i]<inputTemps[j]){
                                break;
                            }
                            else if(j == inputTemps.Length-1){
                                noTempGreater = true;
                            }
                            else
                            {
                                countDays++;
                            }
                            Console.WriteLine("Count days when in J loop {0}", countDays);
                            Console.WriteLine("Value of j {0}", j);
                        }
                        if(noTempGreater){
                            answer[i] = 0;   
                        }
                        else{
                         answer[i] = countDays;
                        }
                    }
                    else {
                        answer[i] = countDays;
                    }
                }
            }
            foreach(var item in answer){
                Console.WriteLine("the list of array {0}", item);
            }
        }
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: