Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3395366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:16:53+00:00 2026-05-18T04:16:53+00:00

hey guys. i was wandering if anyone knew how to create code so that

  • 0

hey guys. i was wandering if anyone knew how to create code so that the console is not opened, rather a formatted web page.

any suggestions will be much appreciated!

regards

namespace Grades
{
    class Program
    {
        static void Main()
        {

            Console.WriteLine("\t\tValue Distribution\n");

            String text = File.ReadAllText(@"values.dat"); //obviously change file path again

            char[] c = text.ToCharArray(); //convert to char array

            var g = c.OrderBy(a => a); //order array

            foreach (char group in g)
            {
                Console.WriteLine(group.ToString()); //loop, displaying ordered array
            }
            //
            int aCount = c.Count(a => a == 'A'); //count all 'A' instances
            int bCount = c.Count(b => b == 'B'); //count all 'B' instances
            int cCount = c.Count(cc => cc == 'C'); //count all 'C' instances
            int dCount = c.Count(d => d == 'D'); //count all 'D' instances
            int eCount = c.Count(e => e == 'E'); //count all ''E' instances
            int fCount = c.Count(f => f == 'F'); //count all 'F' instances

            //
            Console.WriteLine("\nA = {0}", aCount);
            Console.WriteLine("B = {0}", bCount);
            Console.WriteLine("C = {0}", cCount);
            Console.WriteLine("D = {0}", dCount);
            Console.WriteLine("E = {0}", eCount);
            Console.WriteLine("F = {0}", fCount);

            //multiplying amount in each group by 2
            aCount = aCount * 2;
            bCount = bCount * 2;
            cCount = cCount * 2;
            dCount = dCount * 2;
            eCount = eCount * 2;
            fCount = fCount * 2;

            //outputs graph display
            Console.WriteLine("\n0   10   20   30   40   50   60   70   80   90   100");
            Console.WriteLine("|    |    |    |    |    |    |    |    |    |    |");
            Console.WriteLine("**************************************************");

            //outputs each grade according to the multiplied amount and is therefore displayed with asteriks
            Console.Write(new String('*', aCount)); Console.Write(" A\n");
            Console.Write(new String('*', bCount)); Console.Write(" B\n");
            Console.Write(new String('*', cCount)); Console.Write(" C\n");
            Console.Write(new String('*', dCount)); Console.Write(" D\n");
            Console.Write(new String('*', eCount)); Console.Write(" E\n");
            Console.Write(new String('*', fCount)); Console.Write(" F\n");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:16:54+00:00Added an answer on May 18, 2026 at 4:16 am

    Open a a file “output.html” and write to this file, instead of your console. Obviously, you’ll also want to write slightly different output, i.e. HTML markup etc. That’s the solution to create a single web page from an otherwise console-style program.

    If you want to create web page output on a regular basis, you should let the whole thing run in IIS and use ASP.NET such that you can automatically serve your output to a web request, and take advantage of, e.g., its HTML templating functions.

    I know that’s very general, but maybe it’s a starting point from which you can either explore further or specify your problem!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.