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
leva [86]
1 year ago
9

Please help with this question

Computers and Technology
1 answer:
andrew-mc [135]1 year ago
3 0

The lines of code that write a statement that outputs variable userNum and ends with a newline is:

<h3>The code</h3>

#include <stdio.h>

int main(void) {

int userNum;

userNum = 15; // Program will be tested with values: 15, 40.

printf("%d\n", userNum);

return 0;

}

The above code writes a code in python (not Java) with the variable userNum and ends with a newline.

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

You might be interested in
How to do this? ICT Excel there's a screenshot attached
gtnhenbr [62]

I cannot see the attachment

8 0
3 years ago
What runs horizontally and is identified with numbers?
kramer
D. the answer is Column 
6 0
3 years ago
Read 2 more answers
Write a C program that has the following statements: int a, b; a = 10; b = a + fun(); printf("With the function call on the righ
mart [117]

Answer:Following is the C program:-

#include <stdio.h>

int fun()//function fun of return type int and it returns value 6.

{

   return 6;

}

int main() {

  int a, b;

  a = 10;

  b = a + fun();//adds 6 to a.

  printf("With the function call on the right, ");

  printf("\n%d ",b);//printing b..

return 0;

}

Output:-

With the function call on the right,  

16

Explanation:

The function fun return the value 6 so it adds 6 to a and stores the result in b.

6 0
3 years ago
In most programming languages, the compiler carries a preprocessing step to determine if certain statements will compile. For in
MakcuM [25]

Answer:

See explaination for program code

Explanation:

package com.company;

import java.io.IOException;

import java.nio.file.Files;

import java.nio.file.Paths;

import java.util.Stack;

/*

* A program which reads input from given text filename and prints

* whether it passed the pre-processing stage or not

* Sample input

* int A = (a + b);static void display(int x)

* {

* //A sample input file

* }

* */

public class MyPreprocessor {

/*

* Reads input from filename and returns a string

* containing whole text

* */

public String readInput(String filename) {

String content = "";

try {

content = new String(Files.readAllBytes(Paths.get(filename)));

} catch (IOException e) {

e.printStackTrace();

}

return content;

}

/**

* Filters input since we are only concerned with

* a subset of input = '{}[]()/*'

*/

public String filterText(String text) {

String output = "";

for(int i = 0;i<text.length();++i) {

switch (text.charAt(i)) {

case '[':

case ']':

case '{':

case '}':

case '(':

case ')':

case '*':

case '/':

output += text.charAt(i);

}

}

return output;

}

/*

* Uses stack to determine if input is valid or not

* */

public boolean parse(String input) {

Stack<Character> St = new Stack<Character>();

// '$' is special symbol to represent bottom of stack

St.push('$');

for(int i = 0;i<input.length();++i) {

Character symbol = input.charAt(i);

if(St.peek().equals(getOpenSymbol(symbol)))

St.pop();

else St.push(symbol);

}

return St.peek() == '$';

}

private static Character getOpenSymbol(Character symbol) {

switch (symbol) {

case '}': return '{';

case ']': return '[';

case ')': return '(';

case '*': return '*';

case '/': return '/';

default: return ' ';

}

}

public static void main(String[] args) {

MyPreprocessor preprocessor = new MyPreprocessor();

String inputText = preprocessor.readInput("src/input.txt");

String filteredInput = preprocessor.filterText(inputText);

if(preprocessor.parse(filteredInput))

System.out.println("preprocessing passed.");

else System.out.println("preprocessing failed!");

}

}

6 0
3 years ago
History timeline: who developed what elements first Windows OS and Apple OS?
Harrizon [31]

Answer:

i think bill gates

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • WHAT SHOULD YOU DO IF AN ONCOMING CAR AT NIGHT APPROACHES WITH ITS HIGH-BEAMS ON?
    6·1 answer
  • https://brainly.com/app/ask?entry=top&amp;q=What+did+you+learn+during+this+course+that+reinforces+your+belief+in+your+technology
    5·1 answer
  • Grace whistles while tickling Camille with a feather. Eventually, Camille starts to squirm and giggle every time Grace whistles,
    10·1 answer
  • What are candid shots? what are posed shots?
    13·1 answer
  • Given that add, a function that expects two integer parameters and returns their sum, and given that two variables, euro_sales a
    7·1 answer
  • Do word provides an undo button that can be used to cancel the most recent command or action
    13·1 answer
  • Describe the scope of the variables in this code.
    8·2 answers
  • What is media ethics. Explain two forms of maintaining media ethics with examples​
    13·1 answer
  • Which of the following is NOT a function of a Web Browser?
    9·1 answer
  • You are the security analyst for your organization and have discovered evidence that someone is attempting to brute-force the ro
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!