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
erik [133]
3 years ago
12

Bộ mã I mã hóa được nhiêu kí tự

Computers and Technology
1 answer:
e-lub [12.9K]3 years ago
4 0

Answer:

can u pls talk in English I can't understand your language

You might be interested in
Write a function that converts a string into an int. Assume the int is between 10 and 99. Do not use the atoi() or the stoi() fu
Liula [17]

Answer:

Written in C++

#include <iostream>

#include <sstream>

using namespace std;

int main()  {

   string num;

   cout<<"Enter a number: ";

   cin>>num;

   stringstream sstream(num);

   int convertnum = 0;

   sstream >> convertnum;

   cout << "Output: " << convertnum;

}

Explanation:

Without using atoi() or stoi(), we can make use of a string stream and this is explained as follows:

This line declares a string variable num

   string num;

This line prompts user for input

   cout<<"Enter a number: ";

This line gets user input

   cin>>num;

This line declares a string stream variable, sstream

   stringstream sstream(num);

This line declares and initializes the output variable, convertnum to 0

   int convertnum = 0;

The stream is passed into the output variable, convertnum

   sstream >> convertnum;

This line displays the output

   cout << "Output: " << convertnum;

<em>Note that: if user enters a non integer character such as (alphabet, etc), only the integer part will be convert.</em>

<em>For instance,</em>

<em>40a will be outputted as 40</em>

6 0
3 years ago
Which of the following is true of lossy and lossless compression algorithms?
taurus [48]

B. Lossy compression algorithms are typically better than lossless compression algorithms at reducing the number of bits needed to represent a piece of data.

7 0
3 years ago
Autonomous learners have a vast array of learning strategies in their toolboxes to choose from, most of which are effective in a
sergij07 [2.7K]

Answer:

True

Explanation:

Autonomous learners are individuals who take control of their own learning, either independently or in collaboration with others, and do not rely on teachers. Therefore based on the information provided within the question it can be said that the statement is completely true. Since they take control of their own learning, they use a variety of different techniques and tools that best suite their learning methods.

5 0
4 years ago
Write programs for two MSP430 boards to do the following:
Rainbow [258]

Answer:

Explanation:

#include "msp430g2553.h"

#define TXLED BIT0

#define RXLED BIT6

#define TXD BIT2

#define RXD BIT1

const char string[] = { "Hello World\r\n" };

unsigned int i; //Counter

int main(void)

{

WDTCTL = WDTPW + WDTHOLD; // Stop WDT

DCOCTL = 0; // Select lowest DCOx and MODx settings

BCSCTL1 = CALBC1_1MHZ; // Set DCO

DCOCTL = CALDCO_1MHZ;

P2DIR |= 0xFF; // All P2.x outputs

P2OUT &= 0x00; // All P2.x reset

P1SEL |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD

P1SEL2 |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD

P1DIR |= RXLED + TXLED;

P1OUT &= 0x00;

UCA0CTL1 |= UCSSEL_2; // SMCLK

UCA0BR0 = 0x08; // 1MHz 115200

UCA0BR1 = 0x00; // 1MHz 115200

UCA0MCTL = UCBRS2 + UCBRS0; // Modulation UCBRSx = 5

UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**

UC0IE |= UCA0RXIE; // Enable USCI_A0 RX interrupt

__bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ int until Byte RXed

while (1)

{ }

}

#pragma vector=USCIAB0TX_VECTOR

__interrupt void USCI0TX_ISR(void)

{

P1OUT |= TXLED;

UCA0TXBUF = string[i++]; // TX next character

if (i == sizeof string - 1) // TX over?

UC0IE &= ~UCA0TXIE; // Disable USCI_A0 TX interrupt

P1OUT &= ~TXLED; }

#pragma vector=USCIAB0RX_VECTOR

__interrupt void USCI0RX_ISR(void)

{

P1OUT |= RXLED;

if (UCA0RXBUF == 'a') // 'a' received?

{

i = 0;

UC0IE |= UCA0TXIE; // Enable USCI_A0 TX interrupt

UCA0TXBUF = string[i++];

}

P1OUT &= ~RXLED;

}

7 0
4 years ago
Which of the following are advantages of<br> assessments? Check all that apply.
garri49 [273]
Can you add a picture of the options
7 0
3 years ago
Other questions:
  • Zack is working on an assignment at school. He wants to save his work so he can take it home and complete it on his home compute
    13·1 answer
  • Consumers’ ability to ""time shift"" programs using DVRs and Internet video and other situations that lack simultaneity is an ex
    6·1 answer
  • Help with number 12 please!
    15·1 answer
  • What is blockchain? How it works? I heard bitcoin uses it.
    8·1 answer
  • A company that manufactures machine parts orders a new system that makes products at ten times the speed of the earlier machine.
    6·2 answers
  • Write a script that calculates the common factors between 8 and 24. To find a common factor, you can use the modulo operator (%)
    14·1 answer
  • You can rotate a selected graphic by dragging a ________ rotation handle
    13·1 answer
  • Word processing software, spreadsheet software, database software, and presentation software are examples of what category of co
    13·1 answer
  • If someone has the IP address 127.0.0.1 and tries to connect to the address 127.255.252.255, which are they attempting to connec
    8·1 answer
  • 5 examples on technology identification
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!