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
worty [1.4K]
2 years ago
5

Which for loop syntax is correct?

Computers and Technology
1 answer:
Ugo [173]2 years ago
3 0

Answer:

C

Explanation:

You might be interested in
Write code which takes inputs and creates two Rectangle objects (using the edhesive.shapes.Rectangle class) and compares them us
iogann1982 [59]

Answer:

System.out.println("Enter length:");

Scanner scan = new Scanner(System.in);

Double x = scan.nextDouble();

System.out.println("Enter 2 lengths:");

Double a = scan.nextDouble();

Double b = scan.nextDouble();

Rectangle rect = new Rectangle(x);

Rectangle rect2 = new Rectangle (a,b);

if (rect2.equals(rect)){

 System.out.print("Congruent Rectangles");

}

else {

 System.out.print("Different Rectangles");

}

 }

}

Explanation:

6 0
3 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
How to make python coding do addition
ad-work [718]
Do you mean with the computer
3 0
3 years ago
Need help to answer this question​
valina [46]

Answer:

D. The sun

Explanation: Illuminated objects are objects that are capable of reflecting light to our eyes. The sun is an example of a luminous object, while the moon is an illuminated object.

3 0
3 years ago
Read 2 more answers
Which programming language uses mnemonic code to represent data, instructions, and memory locations?
Mars2501 [29]

Answer:

B. Assembly Language

Explanation:

Assembly language is the first language that used English like words for representing data, instruction and memory locations. The English-like words are called Mnemonics.

Assembly language uses translator to translate the code into machine language. The translator is called assembler.

The mnemonics examples are:

ADD

SUB

DIV

MUL ..

4 0
3 years ago
Read 2 more answers
Other questions:
  • Who would use a magnetic hard drive? Give a scenario and include examples as well as detail.
    5·1 answer
  • If you want to copy a file from one folder to another , what would you do?
    15·1 answer
  • Compare the specialized and statistical functions in excel
    10·1 answer
  • What are some of the causes for error 1921 when updating?
    11·2 answers
  • American Standard Code for Information Interchange (ASCII) would be classified at which layer of the OSI Model?
    13·1 answer
  • Have you ever tried to learn a new language or do you have friends who've had that experience? What are some of the steps you wo
    10·2 answers
  • What are the advantages of Database management system (DBMS)??<br>At least mention six of them​
    10·1 answer
  • Previous
    11·1 answer
  • The Zoom feature allows you to either increase or decrease the size of your document on the screen,
    6·1 answer
  • How do we store value in a variable? Give an example
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!