#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
#    http://shiny.rstudio.com/
#

# Simple Calculator Shiny App

# This Shiny application serves as a basic calculator that allows users to perform arithmetic operations on two numbers. Users can input two numbers and select an operation (addition, subtraction, multiplication, division), and the app will display the result in real-time.

# How to Use the App:
# Enter the first number in the "Enter Number 1" textbox.
# Enter the second number in the "Enter Number 2" textbox.
# Select the desired arithmetic operation using the radio buttons.
# The app will instantly display the calculated result below the input fields.

# Features:

# User-friendly interface for input and selection of arithmetic operations.
# Real-time calculation and display of results.
# Supports addition, subtraction, multiplication, and division.

library(shiny)

# Define UI for application
shinyUI(fluidPage(
    titlePanel("Simple Calculator"),
    sidebarLayout(
        sidebarPanel(
            numericInput("num1", label = "Enter Number 1:", value = 0),
            numericInput("num2", label = "Enter Number 2:", value = 0),
            radioButtons("operator", label = "Select Operator:",
                         choices = c("Add", "Subtract", "Multiply", "Divide"),
                         selected = "Add")
        ),
        mainPanel(
            verbatimTextOutput("result")
        )
    )
))

Simple Calculator