Write a program that applies the Euclidean algorithm to find the greatest common divisor of two integers. Input should be two integers a and b and output should be the greatest common divisor of a and b. Test your program with several examples using both positive and negative values for a and b.

Answers

Answer 1

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

// function that return greatest common divisor

int g_c_d(int num1, int num2)

{

if (num1 == 0)

 return num2;

return g_c_d(num2 % num1, num1);

}

// main function

int main()

{

// variables

int num1,num2;

cout<<"enter two numbers:";

// read two numbers from user

cin>>num1>>num2;

// call the function and print the gcd of both

cout<<"greatest common divisor of "<<num1<<" and "<<num2<<" is "<<g_c_d(num1.num2)<<endl;

}

Explanation:

Read two numbers from user and assign them to variables "num1" and "num2".Call the function g_c_d() with parameter "num1" and "num2".According to Euclidean algorithm, if we subtract smaller number from the larger one the gcd will not change.Keep subtracting the smaller one then we find the gcd of both the numbers.So the function g_c_d() will return the gcd of both the numbers.

Output:

enter two numbers:5 9

greatest common divisor of 5 and 9 is 1

enter two numbers:-25 15

greatest common divisor of -25 and 15 is 5

Answer 2

The Euclidean algorithm is used to find the greatest common divisor of two integers, which is implemented in a Python program that works with both positive and negative integers. An example demonstrates that the GCD of 48 and 18 as well as -48 and 18 is 6.

The question involves writing a program that uses the Euclidean algorithm to calculate the greatest common divisor (GCD) of two integers. The Euclidean algorithm is a method for finding the greatest common divisor of two numbers, which is the largest number that divides both of them without leaving a remainder.

The program will take two integers as input and provide their greatest common divisor as output. To accommodate both positive and negative input values, the algorithm can be implemented as follows in Python:

def gcd(a, b):
   while b != 0:
       a, b = b, a % b
   return abs(a)

# Examples using the function
gcd_result1 = gcd(48, 18)
print(f'The GCD of 48 and 18 is {gcd_result1}')

# The function can also handle negative values
gcd_result2 = gcd(-48, 18)
print(f'The GCD of -48 and 18 is {gcd_result2}')

This example demonstrates that the greatest common divisor of 48 and 18 is 6, and the GCD of -48 and 18 is also 6 because the GCD is always a non-negative number.


Related Questions

Write a function named delete Letter that has 2 parameters. The first parameter is a string, the second parameter is an integer. The function removes the character located at the position specified by the integer parameter from the string. For example, if the function is being called with the following statement: deleteLetter ("timetable", 3); the string will become "tietable", where the third character, 'm' has been removed.

Answers

Answer:

//import package

import java.util.*;

// class name

class Solution

{

// method to remove the character at given index

public  static void deleteLetter(String st,int in)

{

// remove the character at index in

 st=st.substring(0,in-1)+st.substring(in);

 System.out.println(st);

}

// main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

//scanner object to read input

   Scanner scr=new Scanner(System.in);

// read string

   System.out.print("Enter the string:");

                    String st=scr.nextLine();

// read index

  System.out.print("Enter the index:");

  int in=scr.nextInt();

// call method

  deleteLetter(st,in);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read a string with the help of Scanner object.Then read the index of character to be remove.Call the method deleteLetter() with parameter string and index.It will make substring from 0 to "in-1" and "in" to last of the string.Then add both the string.This will be the required string.

Output:

Enter the string:timetable

Enter the index:3

tietable

Write code to print the location of any alphabetic character in the 2-character string passCode. Each alphabetic character detected should print a separate statement followed by a newline. Ex: If passCode is "9a", output is: Alphabetic at 1 Hint: Use two if statements to check each of the two characters in the string, using Character.isLetter().

Answers

Final answer:

To find the location of any alphabetic character in a 2-character string, use two if statements to check both characters with Character.isLetter(), consider 0-based indexing while displaying a 1-based output.

Explanation:

The student is asked to write Java code that prints the location of any alphabetic character in a 2-character string called passCode. In Java, the method Character.isLetter() can be used to determine if a given character is a letter. To accomplish this task, two if statements can be used, one for each character in the string, and the indexes are 0-based. If an alphabetic character is found, the program outputs the location of the character using a 0-based index, but since users usually expect a 1-based index, we'll add one to the index before printing. Here is an example of how to write the code:

public class Main {
  public static void main(String[] args) {
      String passCode = "9a";
      if (Character.isLetter(passCode.charAt(0))) {
          System.out.println("Alphabetic at " + (0 + 1));
      }
      if (Character.isLetter(passCode.charAt(1))) {
          System.out.println("Alphabetic at " + (1 + 1));
      }
  }
}
For the string "9a", the output of this code would be "Alphabetic at 2" because 'a' is an alphabetic character at the second position (index 1).

How is a microkernel architecture different from a monolithic architecture?

Answers

Answer:

The monolithic kernel is a bigger process that run in a unique memory address. All the kernel services run over the kernel space.

In micro kernel it get split in services in different memory spaces. Each one run in it own space.

Explanation:

Advantages:

    1. Monolithic:

Faster processing

    2. Micro:

crash proof

Which of the following describes a poor design consideration for a form?

Arrange controls closely together or in a sequence that is easy to read by the user.
Each form should have a different theme.
Make labels descriptive and clear.
Right-align labels followed by a colon and left-align bound controls.

Answers

Answer: Each form should have a different theme.

Explanation: Form is display of requirement for presenting the application having a specific data in it with label.It is made with certain specifications to fulfill the purpose .

The considerations for the designing of form are accessing by the client,clear requirement for designing,layout ,security access provision, purposes like read only etc.

All the considerations mentioned in the question are correct except the different theme belonging to form.The theme or subject depends on the information that the form is based on.The data provided by the form should be precise, sequential and labeled in order to make it informative. So, different theme is the poor consideration for form designing.

Write a program that prints to the screen all the ASCII characters from 33 to 126. 33! 34''

Answers

Answer:

#include <iostream>

using namespace std;

int main() {

   for(int i=33;i<=126;i++)//Using loop to print ASCII characters.

   {

         cout<<i<<char(i<<" ";//statement to print integer and it's ASCII characters with values.

   }

return 0;

}

Explanation:

Put a closing parenthesis i char(i after doing that code will run .Since the answer was not getting posted hence i have to come to this resort.

I have used for loop for values 33 to 126 and for printing the ascii characters I have used typecasting converting the integer to corresponding char forcefully.

A logical DFD shows:

Select one:

a. how a process is performed.

b. the groups of entities logically involved in a business process.

c. the methods for performing activities in a process.

d. the logical grouping of activities in a business process.

e. none of the above.

Answers

Answer:d)the logical grouping of activities in a business process.

Explanation: The logical data flow diagram is the diagram that displays or represents the business related activities.They has easily understandable concept which can be acknowledged by technical as well as non-technical people.They help in providing the data/information by connecting and communicating.

Other options are incorrect because it does not show the process or methods for performing activities neither it works in the form of entities collection in a business..Thus the correct option is option (d).

. Write a short program that asks the user to input a string, and then outputs the

number of characters in the string.

Answers

Answer:

// program in java.

// package

import java.util.*;

// class definition

class Main

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read input from user

Scanner scr=new Scanner(System.in);

System.out.print("Enter a string:");

 // read input

String myString=scr.nextLine();

 // variable to store characters count

int char_count=0;

 // count the characters

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

           if(myString.charAt(i) != ' ')

               char_count++;

       }

       // print the number of character

System.out.println("total characters in the String: "+char_count);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read a string from user with the help of Scanner object and assign it to variable "myString".Iterate over the string and if character is not space (' ') then char_count++. After the loop print the number of characters in the string.

Output:

Enter a string:hello world

total characters in the String: 10

___ causes pain in the forearms due to swelling and pressure on the median nerve passing through the wrist.
Carpal tunnel syndrome
CVS
Tunnel syndrome
RSI

Answers

Answer:

Carpal Tunnel Syndrome.

Explanation:

Carpal Tunnel Syndrome is a very common condition in human beings.If you have carpal tunnel syndrome then you are very likely to feel pain ,tingling,numbness in the arm and hand.

Carpal Tunnel Syndrome happens because of swelling and pressure on one of the major nerves to the hand called the median nerve.

Index addressing is for traversing arrays.

True

False

Answers

Answer:

False.

Explanation:

Index addressing is not for only traversing the arrays but to also access the element,manipulate them.Though indexing is also used in traversing but it is not solely for that.Indexing in an array starts from 0 to size-1.

for example:-

We have an array a of size 10.So to access the element at position 6.We have to write.

a[5];

Manipulating it

a[5]=6;

Consider a class ClassName whose methods are listed below. What class is it?

ClassName(){...}
boolean isEmpty(){...}
void display(){...}
boolean search(int x){...}
void insert(int i){...}
void remove(int x){...}

Answers

Answer:

An implementation of java.util.List interface

Explanation:

Given class consists of the following constructs:

ConstructorisEmpty,search, displayinsert,remove

It supports inserting and removing an element at a specified index. It also supports search and display operations.

These are characteristics of an object which implements the java.util.List interface ( For example: ArrayList or user-defined customList ).

Add a script element into your HTML page that prints ‘hello’ to the browser’s JavaScript developer console.

Answers

Answer:

<!DOCTYPE html>

<html>

<body>

<h2>My Webpage</h2>

<script>

console.log("hello");

</script>

</body>

</html>  

Explanation:

The above written is the HTML code which contains a script tag in which javascript code is written to print hello on the javascript developer console.The script element contains the statement console.log("hello"); which is used to print the argument provided in the console.log on the console of the  javascript.

To see hello on the console you have open javascript console in the browser.Otherwise it will not be visible to you.

Some worms are specifically written to take advantage of newly discovered ____ in operating systems and e-mail programs before the security patch to correct that vulnerability is available.

scripts
applets
file indexes
security holes

Answers

Answer: Security holes

Explanation: Security holes are the patches in the form of vulnerabilities that occur in the antivirus software and other such software that can lead to the hacking or attacking of the system. Security holes are filled in with update as quick repair solution. During this repairing, worms as a malicious  element attacks the system.

Other options are incorrect because scripts is type of language ,applets are small applications and the files index is the index holding the data of files.Thus the correct option is security holes.

Write a Scheme function called "sum" which takes an input function func and a nonnegative number n and outputs the value

func(1) + func(2) + .. + func(n)

Answers

Answer:

function sum(number) {

      if (number == 1) {

             return 1;

      }

      return number + sum(number -1);

}

Explanation:

This is a recursive function, it means that is a function that calls itself for example: if you call the function with sum(5) the process is :

sum(5)

   |______ 5 + sum(4)

                           |_______ 4 + sum(3)

                                                       |______ 3 + sum(2)

                                                                                   |_____2 + sum(1)

                                                                                                        |_____ 1

                                                                                                 

the result is 1+2+3+4+5 = 15

an index purports to speed data retrieval. you, therefore, index every attribute in each table. select the likely consequence.

a. you optimize data retrieval by using a WHERE statement in your SELECT query.

b. data entry slows as every INSERT , UPDATE, or DELETE statement must also update every index.

c. data retrieval on the Gender column is optimized

d. this technique eliminates the need for a primary key

Answers

Answer:

b. data entry slows as every INSERT , UPDATE, or DELETE statement must also update every index.

Explanation:

This process help to improve the speed of get data , it takes each element in the indexed column and save the location to get faster the data. But if you index every attribute in a table it going to take a lot of time locating each column in the respective index in each query(update, delete and insert). For that reason is necesary be carefull with this process and only put index in the relevant columns

Which of the following is a/are question(s) that you should ask before you create an Access report?

What is the purpose of the report?
Who will use the report?
How will the report be distributed?
All the above questions should be asked

Answers

Answer: All the above questions should be asked

Explanation:  Access report are the reports in access which provides the summarized and formatted information display in database. The information in the database is extracted from tables.The access report requires purpose of the report before preparation and the accessing users information to be known .

It is asked to make sure about that no unauthorized access of the report can take place. Distribution of the report among the other user or client is also a major question to be asked as to keep the record of the accessing of access report..Thus, all the question mentioned in the options are correct.

Layer 3 of the Transmission Control Protocol/Internet Protocol (TCP/IP) is called the Internet Layer. Describe the functions of this layer.

Answers

Answer: Internet layer in TCP/IP stack is used for the transmitting and exchanging of information or message between the source and destination in computer systems.The main functions performed by this layer are as follows:-

It  transfers the message to the network interface layer The correct information route and destination is establishedPrefers intelligent routing technique by choosing the shortest route among all paths If any error case of transmission arises then another alternate path for datagram transmission is used.

Which method call converts the value in variable stringVariable to an integer?

Integer.parseInt( stringVariable );
Convert.toInt( stringVariable );
Convert.parseInt( stringVariable );
Integer.toInt( stringVariable );

Answers

Answer:

The correct answer for the given question is Integer.parseInt( string variable );

Explanation:

Integer.parseInt( string variable ); is the method in a java programming language that convert the string into the integer value. It takes a string variable and converted into the integer.

Following are the program in java which convert the string value into an integer value.

class Main  

{

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

{

   String str1 = "10009";

// variable declaration

   int k = Integer.parseInt(str1);

// convert the string into integer.

   System.out.println("Converted into Int:" + k);

}

}

Output:

Converted into Int:10009

Convert.toInt( stringVariable );

Convert.parseInt( stringVariable,Integer.toInt( stringVariable ); are not any method to convert the string into integer .

Therefore the correct answer is :Integer.parseInt( stringVariable );

What is your understanding of the difference between an unconditionally secure cipher and a computationally secure cipher?

Answers

Answer:

  The unconditionally secured is basically define as, the cipher content produced by the plan that doesn't contain enough data to decide the comparing plain message ,regardless of what number of figure content is accessible.

It is basically used to determine the uniquely plain content without knowing the actual availability of the cipher.

The computationally secure cipher is the encryption scheme which is basically required the time for breaking the cipher which exceeds the helpfulness lifetime of that data.  The expense of breaking the figure surpasses the estimation of scrambled data

Create a program in java that calculates area and perimeter of a square - use a class and test program to calculate the area and perimeter; assume length of square is 7 ft.

Answers

Answer:

Following are the program in Java

class abc // class abc

{

   

   public void area(int s) // function area

   {

       s=s*s;// calculate area

       System.out.println(" The area is:" +s + " ft"); // display the area

   }

    public void perimeter(int s) //function perimeter

    {

        s=4*s;//calculate perimeter.

       System.out.println(" The perimeter is:" +s + " ft"); //display the perimeter

    }

}

public class Main //class main

{

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

{

abc ob=new abc(); // creating instance of class abc

ob.area(7); // calling function area

ob.perimeter(7); // calling function perimeter

}

}

Output:

The area is: 49 ft

The perimeter is:28 ft

Explanation:

In  this program we create the class "abc" .We declared two function in the class "abc" i.e "area" and "perimeter" which is calculating the area and perimeter of a square and print them , from the main function we create a object of class "abc" i.e "ob" which called the function area and perimeter .

What is the management part of a dashboard?

Answers

Answer:

 The management dashboard is the visual and display the KPI ( Key performance indicator) and metrics for monitoring the specific process and department.

It is basically used for checking whether the organization achieve or meet its specific goals not as per the requirement of the particular department in the organization.

The main part of the management dashboard is that it provide the visibility and alignment in the particular organization so that it meets according to the requirements of the organization. The basic requirement in the organization are:

Business user Organization needsInformation technology (IT) needs

Final answer:

The management part of a dashboard offers tools for monitoring, analyzing, and reporting on business performance, including real-time data, customizable widgets, and interactive features to strategically manage operations.

Explanation:

The management part of a dashboard is critical to business operations as it provides a visual representation of key performance indicators (KPIs) and metrics to help managers make informed decisions. This component typically includes tools and functionalities that allow for monitoring, analyzing, and reporting on various aspects of business performance.

Dashboards can also feature real-time data updates, customizable widgets, and interactive capabilities to manage operations effectively. For instance, a sales dashboard may contain management features like tracking sales targets, customer acquisition costs, and response times to customer inquiries, which enable leaders to manage their teams and resources strategically.

. The __________ is a set of recommended or best practices for organizations using payment cards.

Answers

Answer: Payment card industry data security standard (PCI DSS)

Explanation:

 The PCI DSS is the set of standard policies that basically used in the organization for the purpose of payment cards.

The PCI DSS was basically created in the 2004 by the major credit card company that is american express ,visa and master card. It provide the procedure for optimize the credit and debit card security. It also protect the cardholders from the misuse for their personal data or information.

It basically maintain the secure network so that the transaction can be easily conducted.

Which of the following are not valid assignment statements? A) total = 9;
B) 72 = amount;
C) yourAge = myAge;

Answers

Final answer:

Option B (72 = amount;) is not a valid assignment statement because a constant value cannot be assigned to another value, whereas valid statements involve assigning values to variables.

Explanation:

The question is asking which of the given assignment statements in the context of a programming language is not valid. An assignment statement typically involves assigning a value to a variable.

The correct answer among the options provided is:

B) 72 = amount; This is not a valid assignment statement because in most programming languages, the value or expression on the right is assigned to the variable on the left. Since '72' is a constant value and not a variable, it cannot be assigned a value.

On the other hand, options A and C are valid assignment statements:

A) total = 9; - This is valid because 'total' is a variable that can be assigned the value of '9'.C) yourAge = myAge; - This is also valid as one variable, 'yourAge', is being assigned the value of another variable, 'myAge'.

."How is social media influencing web applications and development?"

Answers

Answer:

Social media plays a vital role in today's era, it tends to influence the web applications and their development in several ways possible, such as:

Most of the business organizations tend to have a presence on a social media platform and that is considered to be a great way of letting individuals know about your commodities, since most of the people have access to internet.  This is considered one of the reasons that most of the websites created have icons of  different social media platforms that the organization has presence on. The tendency to use icons in order to project which social platform an organization is on is turning out to be more vital for many websites today.

Final answer:

Social media platforms like are reshaping web development, with a strong influence on the dissemination of information, including political discourse.

Explanation:

Social media is significantly influencing web applications and development, reshaping how they interact with users and how content is delivered. Platforms like Face-book and Twi-tter have become central to disseminating information, including political discourse, news, and general public communication. The extensive reach of these platforms raises critical questions about their influence on political information, elections, and public policy.

Social media's impact on web development is evident in the proliferation of features that promote social sharing and connectivity. Features such as liking, sharing, and comments sections are now standard on various web applications, driven by the desire to increase user engagement and time spent on sites. Beyond these features, the backbone technologies of the internet, like Cloud Computing, are being harnessed to support the massive amounts of data generated and shared via social media.

Write a C# Console application that converts a mile into its equivalent metric kilometer measurement. The program asks the user to input the value of miles to be converted and displays the original miles and the converted value . Test your code with inputs (1) 10 miles, (2) 3.25 miles.

Answers

Answer:

Following are the program in c#

using System;  // namespace system

using System.Collections.Generic;  // namespace collection

using System.Linq;

using System.Text;

namespace test // namespace

{

   class Program1 // class

   {        

                 

       static void Main(string[] args) // Main function

       {

           double nMiles, nKm;

           Console.Write("Enter Value In Miles : ");

           nMiles =Convert.ToDouble(Console.ReadLine());

           nKm = (nMiles / 0.62137);

           Console.WriteLine("Output:");

           Console.WriteLine("Value In Miles :" + nMiles);

           Console.WriteLine("Value In KM :" + nKm);

           Console.Read();

       }

   }

}

Output:

Case A-

Enter Value In Miles : 10

Value In Miles : 10

Value In KM : 16.09347

Case B-

Enter Values In Miles : 3.25

Value In Miles : 3.25

Value In KM : 5.230378

Explanation:

Here we take a input value in "nMiles" variable and converted into a Km. that will stored in "nkm" variable  . To convert miles into km we use  calculative formula Km=(miles/0.62137). This formula convert the entered value into km and finally print the value of miles and km miles variable.

Which of the following is true of two-factor authentication?

A. It uses the RSA public-key signature based on integers with large prime factors.

B. It requires two measurements of hand geometry.

C. It does not use single sign-on technology.

D. It relies on two independent proofs of identity.

Answers

Answer: D)It relies on two independent proofs of identity.

Explanation: Two factor authentication is technique which uses two steps/stage for the verification or authentication.It is done for the extra security maintenance.IT is also known as 2FA. It consist of two different authentication component so that it penetrates through double protection layer .

Other options are incorrect because It RSA public key cannot be used for the authentication of private content. It does not use both hand geometry at same time for both the levels and It does not utilize only single sign-on technology. Thus, the correct option is option(D).

A common measure of transmission for digital data is the number of bits transmitted per second. Generally, transmission is accomplished in packets consisting of a start bit, a byte (8 bits) of information, and a stop bit. Using these facts, answer the following:

a. Compute the time required to transmit an image of 1200x800 pixels with 8 bits for gray of each pixel using a 50 M bits/sec. modem?

b.What would the time be at 3 M bits/sec, a representative of download speed of a DSL connection?

(c) Repeat a and b when the image is RGB colored with 8 bits for each primary color. f 20 colored frames per second

Answers

Answer:  a) 0,19 seg. b) 3,2 seg. c) 11,5 seg.  d) 192 seg.

Explanation:

a)  For each pixel in the image, we use 8 bits + 1 start bit + 1 stop bit= 10 bits.

Number of Pixels: 800*1200= 960,000.Bits transmitted: 960,000 x 10 = 9.6 * 10⁶ bits = 9.6 Mbitsif  the modem is able to transmit up to 50 Mbits in a second, we can calculate how much time it will be needed to transmit 9.6 Mbits, using this equality:

50 Mbit = 1 sec9.6 Mbit = x  ⇒  t= 9.6 / 50 = 0.19 sec

b)  If the modem speed changes to 3 Mb/s, all we need to do is just use the same equality, as follows:

3 Mbit = 1 sec9.6 Mbit = x  ⇒  t= 9.6 / 3 = 3.2 sec

c) Now, if we need to transmit a colored image , at a rate of 20 f/sec, we need to calculate first how many bits we need to transmit, as follows:

1 Frame= 800*1200* (24 bits + 3 start bits + 3 stop bits)=  28.8  Mbits1 Second= 20 frames/ sec = 28.8 Mbits *20 = 576 Mbits.If the modem speed is 50 Mb/s, we can use the same formula that we used for a) and b), as follows: 50 Mbit = 1 sec576 Mbits = x  ⇒  t= 576 / 50 = 11.5 sec

d) Same as c) replacing 50 Mb/s by 3 Mb/s, as follows:

3 Mbit = 1 sec576 Mbits = x  ⇒  t= 576 / 3 = 192 sec

The time that's required to transmit an image of 1200x800 pixels with 8 bits for gray is 151.6 million seconds.

How to calculate the time taken?

The time required to transmit an image of 1200x800 pixels with 8 bits for gray will be:

= (1200 × 800 × 8) / 50

= 151.6 million seconds.

The time needed to be at 3 M bits/sec, a representative of download speed of a DSL connection will be:

= 7.68/3

= 2.56 seconds.

Learn more about time on:

https://brainly.com/question/4931057

What is the Matlab command to create a vector of the even whole numbers between 29 and 73?

Answers

Answer:

x = 29:73;

x_even = x(2:2:end);

Explanation:

In order to create a vector in Matlab you can use colon notation:

x = j:k

where j is 29 and k is 73 in your case:

x = 29:73

Then you can extract the even numbers by extracting the numbers with even index (2,4,6,etc.) of your vector:

x_even = x(2:2:end);

In the line of code above, we define x_even as all the elements of x with even index from index 2 till the end index of your vector, and an increment of 2 in the index: 2,4,6,etc.

If you want the odd numbers, just use the odd indices of your vector:

x_odd = x(1:2:end);

where x_odd contains all the elements of x with odd index from index 1 till the end index, and an increment of 2: 1,3,5,etc.

Write a procedural programming loop.. Your loop should start variable n with a value of 10 and count down to zero. The loop should terminate when n reaches the value of zero.

Answers

Answer:

//Here is the for loop in C.

for(n=10;n>0;n--)

{

   printf("count =%d \n",n);

}

Explanation:

Since C is a procedural programming language.Here if a loop that starts with n=10; It will run till n becomes 0. When n reaches to 0 then loop terminates otherwise it  print the count of n.

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{  // variables

int n;

// for loop that runs 10 times

// when n==0 then loop terminates

for(n=10;n>0;n--)

{

   cout<<"count ="<<n<<endl;

}

return 0;

}

Output:

count =10

count =9

count =8

count =7

count =6

count =5

count =4

count =3

count =2

count =1

To copy a list you can use this. list2 = list1[ : ]

True or False

Answers

Answer:

True.

Explanation:

The colon in square brackets is used to subsetting the list.

for example list1=[1,2,4,6,2,5]

print(list1[3:5])

This will print 6 ,2

Because it means the list from index 3 to 4 the last value is not inclusive.So if you write [:] it means the whole list and in the question we are assigning it to list2.So all the values from list1 will be copied to list2.

An extract report lists ____________.

(Points : 2) records that satisfy selection criteria
summary information only
every record read and processed
only records that are sorted

Answers

Answer: Summary information only

Explanation:

The extract report is basically design to create the various output files and contain only summary information. In the extract report we can listed and modify the data sets according top the specific requirements.

The extract report is basically used to describe the summary and specif pattern of the information or data.

The extract report is basically generated when the overall extract job is executed and submitted.  

Other Questions
9. The Metro Rail makes a stop at NRG Stadium to pick up some Texans fans after the game. Afterall the passengers board, the train accelerates at a rate of 4 m/s? to a top speed of 30 m/s. Howlong does it take for the train to reach top speed? How far does it travel before it reaches its topspeed? how to import any csv from internet in phyton 3 and R ? Polygon ABCD has the following vertices: A(-4,2) , B(3,2) , C(3,-5) , and D (-4, -2) Calculate the area of the polygon Two tiny conducting spheres are identical and carry charges of -19.8C and +40.7C. They are separated by a distance of 3.59 cm. (a) What is the magnitude of the force that each sphere experiences? (b) The spheres are brought into contact and then separated to a distance of 3.59 cm. Determine the magnitude of the force that each sphere now experiences. Which macromolecule is made up of a glycerol backbone and 3 fatacid tails? What does the structure look like? A maple syrup producer would like to increase production by 500 gallons per each consecutive year with a goal of producing at least 20,000 gallons of syrup cumulatively for the first five year period of production.If the first years production, in gallons, is given by x, write expressions for each of the other years productions.Year 1 = x Year 2 = Year 3 = Year 4 = Year 5 =b) Find all possible values of syrup that could be produced the first year to meet the goal of at least 20,000 gallons cumulatively over the five-year period. You must set up a mathematical formula/rule and solve algebraically. What did the Connecticut belief What is a baguette?A.a hot dog type of bunB.a round breadC.a long slender bread with lots of crust a new wireless printer costs $99.99 in the store. what would your total cost be if sales tax is 9.5% 1. Quelle est la rponse correcte?Il est souvent en ret#rd? (brainly censors the word late)Non, il n'est toujours en ret#rd.Non, il n'est jamais en ret#rd.Non, il n'est pas encore en ret#rd.2. Quelle est la rponse correcte?Tu es toujours la maison?(2 points)Non, je ne suis plus la maison.Non, tu n'es pas la maison.Non, je suis plus la maison.3. Quelle est la forme correcte de la phrase au ngatif?Elle se lave les cheveux.(2 points)Elle se lave pas les cheveux.Elle ne se pas lave les cheveux.Elle ne se lave pas les cheveux.4. Quelle est la forme correcte de la phrase au ngatif?Nous nous habillons rapidement.(2 points)Nous nous ne habillons pas rapidement.Nous ne nous habillons pas rapidement.Nous ne nous habillons rapidement pas.5. Quelle est la forme correcte de la phrase au ngatif?Vous vous rveillez tous les matins 7 heures.(2 points)Vous ne vous rveillez tous les matins 7 heures.Vous vous rveillez pas tous les matins 7 heures.Vous ne vous rveillez pas tous les matins 7 heures.6. Quelle est la forme correcte de la phrase au ngatif?Je me suis lev tard.(2 points)Je me ne suis lev pas tard.Je me suis lev pas tard.Je ne me suis pas lev tard.7. Quelle est la traduction correcte?I'm never late.(2 points)Je n'arrive jamais en ret#rd.Je n'arrive plus en ret#rd.J'arrive pas t#rd.8. Quelle est la traduction correcte?We never get dressed quickly.(2 points)Nous ne nous levons jamais rapidement.Nous ne nous habillons jamais rapidement.Nous ne nous habillons pas rapidement.9. Quelle est la traduction correcte?They are open on time.(2 points)Ils sont souvent l'heure.Ils ne sont jamais l'heure.Ils ne sont souvent l'heure. 15. What is one cause of the development of many small independent city-states inancient Greece?a. Military leaders were able to avoid detection by the enemy.b. The mountainous terrain of Greece resulted in widely isolated settlements.c. merchants traveling between the Indian peninsula and Europe needed places tostop for rest and foodd. The form of government in each community was a dictatorship Which statements were a factor in the decline of Sumer?Select all correct answers A: as the fields of Sumer grew saltier, harvests were less plentiful. B:Wars among the city-states plagued the Sumerians. C:Sumer was located on a mountain. What is the r.a.m. value of krypton (Kr)? A. 36 amu B. 1/36 amu C. 84 amu D. 1/84 amu The following data is available for Blaine Corporation at December 31, 2012: Common stock, par $10 (authorized 25,000 shares) $200,000 Treasury Stock (at cost $15 per share) 900 Based on the data, how many shares of common stock are a) outstanding, and b) have been issued ? a.25,000 b.20,000 c.24,940 d.19,940 A boy is walking down the road with a doctor. Whilethe boy is the doctor's son, the doctor is not theboy's father. Then who is the doctor? President Bigego is running for re-election against Senator Pander. Bigego proclaims that more people are working now than when he took office. Pander says that the unemployment rate is higher now than when Bigego took office. You conclude that.... a. both of them could be telling the truth if the labor force grew slower than employment. b. both of them could be telling the truth if the labor force grew faster than employment. c. one of them must be lying. d. both of them could be telling the truth if the labor force, and employment grew at the exact same rate. Suppose that scores on a test are normally distributed with a mean of 80 and a standard deviation of 8. Answer the questions below. (a) What is the 70th percentile? (round to the tenths place) (b) What percentage of students score less than 70? (round to the tenths place, give the percent) True or false? The Earth is the only planet in our Solar System with a natural satellite. Identify the outlier of each set of values.4. 32 35 3 36 37 35 38 40 42 34 Which of the following statements is/are true? (Points : 5) A. A default constructor is automatically created for you if you do not define one. B. A static method of a class can access non-static members of the class directly. C. An important consideration when designing a class is identifying the audience, or users, of the class. None of the above Only A and C