Skip to content

This README outlines a C# console application showcasing key programming concepts, including arithmetic operations, string manipulations, exception handling, and object-oriented programming with classes and interfaces. The application features tasks like generating Pascal's and Floyd's Triangles, stack operations, and shape manipulations.

Notifications You must be signed in to change notification settings

Guruprasad619/Csharp-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

README for C# Code

Introduction

This C# code is a console application that encompasses various functionalities, including arithmetic operations, string manipulations, exception handling, and implementations of mathematical concepts. It also features object-oriented programming with classes and interfaces, demonstrating the use of shapes, complex numbers, and stack operations.

Table of Contents

  1. [Arithmetic Operations]
  2. [Check Armstrong Number]
  3. [Find Substrings]
  4. [Divide by Zero Exception]
  5. [Pascal's Triangle]
  6. [Floyd's Triangle]
  7. [Read File]
  8. [Stack Operations]
  9. [Complex Number Operations]
  10. [Shapes Drawing and Erasing]
  11. [Shapes Area and Perimeter]
  12. [Resize Rectangle]

Instructions

  1. Arithmetic Operations

    • Accepts two numbers and performs basic arithmetic operations such as addition, subtraction, multiplication, division, modulus, exponentiation, and exponential.
  2. Check Armstrong Number

    • Validates whether a given number is an Armstrong number.
  3. Find Substrings

    • Takes a user input string and prints all possible substrings.
  4. Divide by Zero Exception

    • Demonstrates a try-catch block for handling a DivideByZeroException.
  5. Pascal's Triangle

    • Generates and prints Pascal's Triangle based on the user-specified number of rows.
  6. Floyd's Triangle

    • Generates and prints Floyd's Triangle based on the user-specified number of rows.
  7. Read File

    • Reads and displays the content of a text file using different approaches, such as File.ReadAllText(), File.ReadAllLines(), and StreamReader.
  8. Stack Operations

    • Implements a basic stack with operations like push, pop, peek, and display.
  9. Complex Number Operations

    • Takes two complex numbers as input, performs addition, and displays the result.
  10. Shapes Drawing and Erasing

    • Illustrates polymorphism by drawing and erasing various shapes (Circle, Triangle, Square, Rectangle).
  11. Shapes Area and Perimeter

    • Calculates and displays the area and perimeter of different shapes (Circle, Triangle, Square, Rectangle).
  12. Resize Rectangle

    • Allows the user to create a rectangle and then resize it by changing its width and height.

Running the Program

  • Execute the Main() method in the Program class to start the program.
  • Choose from the menu options by entering the corresponding number.

Note

  • The program is structured using object-oriented principles, demonstrating the use of classes, interfaces, and inheritance.
  • Some functionalities may prompt for user input, so follow the on-screen instructions.

Collaborator

About

This README outlines a C# console application showcasing key programming concepts, including arithmetic operations, string manipulations, exception handling, and object-oriented programming with classes and interfaces. The application features tasks like generating Pascal's and Floyd's Triangles, stack operations, and shape manipulations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages