1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
netineya [11]
3 years ago
13

Re-write the following arithmetic expressions as Scheme expressions and show the result of the Scheme interpreter when invoked o

n your expressions. (a) (22+42) (54 x 99).(b) ((22+42) x 54) x 99. (c) 64 x 102 + 16 x (44/22).
Computers and Technology
1 answer:
Gelneren [198K]3 years ago
6 0

Answer:

See Answer Below:

Explanation:

a) (22+42) (54 x 99)

= (22 + 42) × (54 × 99)

  (*      (+ 22 42)

           (* 54 99))

(b)    ((22+42) x 54) x 99

      = (*     (*    (+ 22 42)

                       54

                 99)

(c)  64 x 102 + 16 x (44/22)

   = (+    (* 64 102)

             (* 16

                 (/ 44 22) ) )

You might be interested in
Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is
vlabodo [156]

Answer:

C++:

C++ Code:

#include <iostream>

#include <string>

using namespace std;

struct date

{

  int d,m,y;

};

int isLeap(int y)

{

  if(y%100==0)

  {

      if(y%400==0)

      return 1;

      return 0;

  }

  if(y%4==0)

  return 1;

  return 0;

}

int day_no(date D)

{

  int m = D.m;

  int y = D.y;

  int d = D.d;

  int i;

  int mn[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};

  for(i=0;i<m;i++)

  {

      d += mn[i];

  }

  if(isLeap(y))

  {

      if(m>2)

      d++;

  }

  return d;

}

date get_info(string s)

{

  date D;

  int i,p1,p2,l = s.length();

  for(i=0;i<l;i++)

  {

      if(s[i] == '-')

      {

      p1 = i;

      break ;

      }

  }

  for(i=p1+1;i<l;i++)

  {

      if(s[i] == '-')

      {

      p2 = i;

      break ;

      }

  }

 

  D.m = 0;

  for(i=0;i<p1;i++)

  D.m = (D.m)*10 + (s[i]-'0');

 

  D.d = 0;

  for(i=p1+1;i<p2;i++)

  D.d = (D.d)*10 + (s[i]-'0');

 

  D.y = 0;

  for(i=p2+1;i<l;i++)

  D.y = (D.y)*10 + (s[i]-'0');

 

  return D;

 

}

int main()

{

  string s1 = "4-5-2008";

  string s2 = "12-30-1995";

  string s3 = "6-21-2000";

  string s4 = "1-31-1500";

  string s5 = "7-19-1983";

  string s6 = "2-29-1976";

 

  cout<<"Date\t\tDay no\n\n";

  cout<<s1<<"\t"<<day_no(get_info(s1))<<endl;

  cout<<s2<<"\t"<<day_no(get_info(s2))<<endl;

  cout<<s3<<"\t"<<day_no(get_info(s3))<<endl;

  cout<<s4<<"\t"<<day_no(get_info(s4))<<endl;

  cout<<s5<<"\t"<<day_no(get_info(s5))<<endl;

  cout<<s6<<"\t"<<day_no(get_info(s6))<<endl;

 

 

  return 0;

}

Explanation:

4 0
3 years ago
Which of the following might be a job or task of an IT worker who manages networks?
Vladimir79 [104]
We need the options to be able to help.
7 0
4 years ago
Read 2 more answers
What is digital marketing?
valkas [14]

Answer:

Digital marketing is the component of marketing that utilizes internet and online based digital technologies such as desktop computers, mobile phones and other digital media and platforms to promote products and services.

Explanation:

3 0
3 years ago
Who are griefers?
S_A_V [24]

D) People who try to irritate you and harass you in online games

7 0
3 years ago
(10101) 2 = ( ? ) 10
expeople1 [14]

\huge\bigstar\:\Huge\tt\underline\blue{ANSWER}

(10101)_2=(21)10

\huge\bigstar\:\Huge\tt\underline\red{EXPLAINATION}

Given : Number  (10101)_2(10101)2

To find : What is the value of  (10101)_2(10101)2 in decimal number system?

Solution :

Decimal number system is a positional numeral system employing 10 as the base.

Now, to convert it into base 10

Multiply each digit of the following binary by the corresponding power of 2:

(10101)_2(10101)2

=1\times 2^4+0\times 2^3+1\times 2^2+0\times 2^1+1\times 2^0=1×24+0×23+1×22+0×21+1×20

=1\times 16+0\times 8+1\times 4+0\times 2+1\times 1=1×16+0×8+1×4+0×2+1×1

=16+0+4+0+1=16+0+4+0+1

=21=21

Therefore,  (10101)_2=(21)_{10}(10101)2=(21)10

5 0
3 years ago
Other questions:
  • Why is it best to run antivirus scans when the computer isn't being utilized?
    7·1 answer
  • What is one course of action available in every problem solving process?
    9·2 answers
  • (a) Write a SCHEME function (make-change n den) which outputs a list of change specifications. Namely, a call (make-change 11 (l
    8·1 answer
  • What are at least three differences between a personal and non-personal blog?
    5·1 answer
  • What does it mean to empty the cache?
    6·1 answer
  • which internet technology allows businesses to make presentation and share visual aids such as charts and graphs
    14·2 answers
  • PYTHON:
    11·1 answer
  • Eating food while drinking speeds up alcohol<br> absorption.<br> True<br> False
    5·2 answers
  • CIS261: Python Programming I home<br>&gt;<br>6.8: LAB: Miles to track laps
    13·1 answer
  • The (blank) option will help determine the overall look of her presentation.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!