Spread the word.

Share the link on social media.

Share
  • Facebook
Have an account? Sign In Now

Sign Up

Have an account? Sign In Now

Sign In

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

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

SIKSHAPATH

SIKSHAPATH Navigation

  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
Home/ Questions/Q 18845
Next
In Process

SIKSHAPATH Latest Questions

newcoder
  • 0
  • 0
newcoder
Asked: June 14, 20222022-06-14T21:58:01+05:30 2022-06-14T21:58:01+05:30In: Programming Language

Study the scenario and complete the question(s) that follow: You …

  • 0
  • 0

Study the scenario and complete the question(s) that follow:
You are provided with the following functions
Min = CalcMin(x1, x2, x3)
The function must determine and return the minimum of the 3 variables.
Area = AreaofTriangle(base, height)
The function must calculate and return the area of a triangle using the parameters

3.1 Write the complete function Min = CalcMin(x1, x2, x3) in pseudocode to calculate and
return the minimum of the three variables.
Note: Assign the correct data type to each variable (10 marks)

3.2 Write the complete function Area = AreaofTriangle(base, height) in pseudocode to calculate
and return the area of a triangle using the parameters. (5 Marks)

3.3 Create your function to estimate the circumference of a circle by passing the radius of the
circle as a parameter only. (5 Marks)

question
  • 1 1 Answer
  • 312 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. I'M ADMIN
      I'M ADMIN
      2022-06-15T16:54:23+05:30Added an answer on June 15, 2022 at 4:54 pm

      3.1

      Explanation:-

      CalcMin() function takes three integer type values as input, and this function returns an integer type value, inside this function, if x1 is less than or equal to x2 and x1 is less than or equal to x3 then return x1

      if x2 is less than or equal to x1 and x2 is less than or equal to x3 then return x2

      Otherwise, return x3

      Pseudocode:-

      int CalcMin(int x1,int x2,int x3){
          if x1<=x2 and x1<=x3:
              return x1
          else if x2<=x1 and x2<=x3:
              return x2
      [mepr-show rules="18938" unauth="message"] 
          else:
              return x3  
      }

      3.2

      Explanation:-

      AreaofTriangle() function, takes two float type values as input, and this function returns a float type value, inside this function, multiply base with height, then divide the result by 2, and store the result in float type variable, area, at the end return area

      Pseudocode:-

      float AreaofTriangle(float base,float height){
          float area=(base*height)/2
          return area
      }

      3.3

      Explanation:-

      circumference() function, takes a float type value as input, and this function returns a float type value, inside this function, multiply 2 and 3.14 with radius, and store the result in float type variable, result, at the end return result

      Pseudocode:-

      float circumference(float radius){
          float result=(2*3.14*radius)
          return result
      }
      
      [/mepr-show]
        • 0
      • Reply
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    store ads

    Stats

    • Questions 1k
    • Answers 1k
    • Posts 149
    • Best Answers 89
    • This Free AI Tool Translates Entire Books in Minute !
    • AI News: 🎬 Hollywood’s AI Studios, 🎓 OpenAI’s Latest Gift to Educators, 🚚 Class8 Bags $22M, 🧠 Google Gemini’s Memory Upgrade
    • AI NEWS: Legal Action Against OpenAI, $16M Paid, & Elon Musk’s Praise from Investor 🤖💰📑 | AI Boosts Cloud Seeding for Water Security 🌱💧
    • AI News: 🎬AI Video Tool Scam Exposed🤯, 🛰️ AI-Powered Drones to Ukraine 😱, Google’s $20M AI Push, Sam Altman Joins SF’s Leadership Team
    • AI News: 🤝 Biden Meets Xi on AI Talks, 💡 Xavier Niel’s Advice for Europe, ♻️ Hong Kong’s Smart Bin Revolution, 🚀 AI x Huawei

    Explore

    • Recent Questions
    • Questions For You
    • Answers With Time
    • Most Visited
    • New Questions
    • Recent Questions With Time

    Footer

    SIKSHAPATH

    Helpful Links

    • Contact
    • Disclaimer
    • Privacy Policy Notice
    • TERMS OF USE
    • FAQs
    • Refund/Cancellation Policy
    • Delivery Policy for Sikshapath

    Follow Us

    © 2021-24 Sikshapath. All Rights Reserved

    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.