PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label maple. Show all posts
Showing posts with label maple. Show all posts

Wednesday, July 20, 2022

[FIXED] How to ascending order the following integers with maple (should not display any digit)

 July 20, 2022     digits, display, integer, maple     No comments   

Issue

In this exercise you should not display any digit. Display only the minimal output required to establish your result. (a) Place the following integers in ascending order 100^(100); 80^(120); 60^(140); 40^(160)

evalb(-3<-2)

anyone can help what's next?


Solution

It's unclear whether you have to show it by steps, or whether you can simply get Maple to sort the quantities directly.

Consider these three comparisons, which should be enough for you to figure out the ascending order:

evalb( 80^(120) > 100^(100) );

           true

evalb( 60^140 > 80^(120) );

           true

evalb( 40^(160) > 60^140 );

           true

Or, starting with a random rearrangement, you can get Maple to sort them.

restart;

# separate paragraph or execution group
interface(typesetting=extended):

S := [100%^(100), 40%^(160), 60%^(140), 80%^(120) ];

answer := sort(S, (a,b)->value(a)<value(b));


Answered By - acer
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing