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
taurus [48]
3 years ago
6

Computer science practical on VB.NET. program 1. program to find the square of a number. write the code achieve it​

Computers and Technology
1 answer:
Korvikt [17]3 years ago
6 0

Answer:

Module Program

   Sub Main()

       Dim num As Integer

       num = 4

       Console.WriteLine("The square of " & num & " is " & num * num)

       Console.ReadKey()

   End Sub

End Module

Explanation:

Very similar to the other program you posted.

You might be interested in
Suppose Alice and Bob are sending packets to each other over a computer network. SupposeTrudy positions herself in the network s
Elden [556K]

<u>Explanation:</u>

  • can observe the contents of all the packets sent and even modify the content.
  • can prevent packets sent by both parties from reaching each other.

From a network security standpoint, since we are told that Trudy <em>"</em><em>positions herself in the network so that she can capture all the packets sent", </em>it, therefore implies that the communication between Alice and Bob is vulnerable to modification and deletion.

6 0
3 years ago
Telepresence provides the opportunity for people to work from home and attend virtually. True False
ira [324]
The answer is true.
Telepresence is essentially things like video-chat that allows people to participate in meetings even if they are not physically present.

I hope this helps! :)
~ erudite 
7 0
3 years ago
Read 2 more answers
Write a recursive method to return the number of uppercase letters in a String. You need to define the following two methods. Th
satela [25.4K]

Answer:

<u>Recursive function with two parameters that return the number of uppercase letters in a String</u>

public static int count(String str,int h)//Defining function

{

      if(str.charAt(0)>='A' && str.charAt(0)<='Z')//Checking the characters from A to Z

{

          h++; //incrementing the counter

          if(str.length()>=2){

              return count(str.substring(1),h);//recalling function

          }

      }

      if(str.length()>=2){

              return count(str.substring(1),h); //recalling function

      }

      return h;

  }

This is the recursive function with the name count of return type integer,having parameters str of string type and h of integer type.In this we are checking the characters at a particular position from A to Z.

<u>Recursive function with one parameter that return the number of uppercase letters in a String</u>

public static int count(String str)//Defining function

{

      if(str.charAt(0)>='A' && str.charAt(0)<='Z')//Checking the characters from A to Z

{

          count++; //incrementing the counter

          if(str.length()>=2){

              return count(str.substring(1));//recalling function

          }

      }

      if(str.length()>=2){

              return count(str.substring(1)); //recalling function

      }

      return count;

  }

This is the recursive function with the name count of return type integer,having parameters str of string type .In this we are checking the characters at a particular position from A to Z.

<u>Java program that return the number of uppercase letters in a String</u>

import java.util.*;

public class Myjava{

static int count =0;//Defining globally  

 

public static int count(String str,int h)//Defining function

{

      if(str.charAt(0)>='A' && str.charAt(0)<='Z')//Checking the characters from A to Z

{

          h++;

//incrementing the counter

          if(str.length()>=2){

              return count(str.substring(1),h);//recalling function

          }

      }

      if(str.length()>=2){

              return count(str.substring(1),h);

//recalling function

      }

      return h;

 

  }

  public static void main(String[] args)//driver function

  {

      System.out.println("Enter a string");//taking input

      Scanner scan = new Scanner(System.in);

      String s = scan.nextLine();

      int h =0;

      System.out.println("Counting the Uppercase letters: "+count(s,h));

  }

}

<u>Output</u>

Enter a string  WolFIE

Counting the Uppercase letters: 4

4 0
3 years ago
Which of the following best describes professional behavior in the IT field?
Ray Of Light [21]
Answer - teaching others about technology in order to increase IT knowledge in the community
4 0
3 years ago
The risk of carbon monoxide poisoning can be reduced by
lisov135 [29]
A machine. I foget the name but there can be a machine, or fresh air, or turning off your car, or opening doors and getting out when there;s a fire or smoke.
5 0
4 years ago
Other questions:
  • Write a loop that sets newScores to oldScores shifted once left, with element 0 copied to the end. Ex: If oldScores = {10, 20, 3
    15·1 answer
  • Need answers for 11&amp;12. Due today. Thanks.
    14·1 answer
  • Tanya is entering the amount of money she has earned from babysitting onto an Excel spreadsheet, but the AutoComplete feature is
    9·2 answers
  • Prodeff, an online project management software, is available at a price of $1 per use. The software requires the user to enter t
    13·1 answer
  • which of the following can be considered a manual control switch a toggle switch a safety switch a drum switch or all of the abo
    9·1 answer
  • Help mah!!! T^T please and thank you mate
    5·2 answers
  • &lt;
    6·1 answer
  • Select three functions of the cell membrane.
    15·2 answers
  • Information in _____ code can be transmitted without errors over the communication network.
    13·2 answers
  • When a motherboard fails, you can select and buy a new board to replace it. Suppose the motherboard in your computer has failed
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!