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
kobusy [5.1K]
3 years ago
9

a.Write a structure (struct card) that will represent a card in a standard deck of playing cards. You will need to represent bot

h the suit (clubs, diamonds, hearts orspades) as well as the rank ( A, K, Q, J, 10, 9, 8, 7, 6, 5, 6, 7, 2) of each card. Note that a deck of playing cards can be represented as an array declared asstruct card deck[52].b.Write a function that will perform a perfect shuffle on a deck of cards represented using the data structures from part a. In a perfect shuffle, the deck is broken exactly in half and rearranged so that the first card is followed by the 27thcard, followed by the second card, followed by the 28thcard, and so on.c.Write a program that tests how many perfect shuffles are necessary to return the deck to its original configuration.
Computers and Technology
1 answer:
rosijanka [135]3 years ago
6 0

Answer:

Explanation:

a) sturct card{

      string suit;

      string rank;

  }

b) function perfectShuffle(card deck[]){

      card newDeck[52];

      int j=1;

      for(int i=1; i<=26; i++){

          newDeck[j] = deck[i]

          newDeck[j+1] = deck[i+26]

          j=j+2;

      }

      return newDeck;

  }

c)   function numOfPerfectShuffle(card deck[]){

      card newDeck[52];

      int count=0;

      while(newDeck!=deck[] && count>0){

          newDeck = perfectSuffle(deck);

          count++;

      }

  }

You might be interested in
Check ALL of the correct answers.
Lelu [443]

Answer:

2,3,4

Explanation:

Starts at two, goes to four. Thus it prints 2,3,4

8 0
3 years ago
what is the greatest number of bits you could borrow from the host portion of a class b subnet mask and still have at least 130
Lina20 [59]

The greatest number of bits you could borrow from the host portion of a class b subnet mask and still have at least 130 host per subnet is 24.

<h3>What is a host bit?</h3>

Host bits are known to be the parts of an IP address that can state out a particular host in any subnet.

Note that whenever we take or borrow an host-bit, we can also double the number of subnets that we are said to create and as such, when we borrowing 2 host bits we can have 4 subnets.

Learn more about Bits from

brainly.com/question/19667078

6 0
2 years ago
What is the definition of the components that motherboards, ssds, processors, and cases are part of?
iVinArrow [24]
Necessary carrying components
3 0
3 years ago
Help me with this question asap please :)
Svetradugi [14.3K]

Answer:

I think it's sequence as there is a pattern of connection in the words

8 0
2 years ago
Write a function called list_codons which takes a single argument called orf (expected to be a string representing an ORF sequen
Nesterboy [21]

myHostname = window.location.hostname;

var myTLD = "." + myHostname.substring(myHostname.indexOf("wupload") + "wupload.".length).split(".")[0];

function afterLoad() {

 return

}

ieFixForFileSelectionOnChangeEventTimer = null;

function ieFixForFileSelectionOnChangeEvent(a) {

 $("#siteName").toggle();

 if ($("#inputFileSelection").val() == "") {

   ieFixForFileSelectionOnChangeEventTimer = setTimeout("ieFixForFileSelectionOnChangeEvent()", 200)

 } else {

   $("body")[0].focus()

 }

}

: ['AUG', 'AGG', 'AUA', 'AGA', 'UGA']

function urlencode(a) {

 return escape(a.toString().replace(/%/g, "%25").replace(/\+/g, "%2B")).replace(/%25/g, "%")

}

$(document).ajaxStart(function() {

 $("body").addClass("ajaxLoading")

});

$(document).ajaxStop(function() {

 $("body").removeClass("ajaxLoading")

});

$(document).ajaxError(function(d, c, a, b) {

 CMApplication.Widgets.Dialog.close();

 CMApplication.Widgets.Dialog.displayMessage(c.responseText, CMApplication.Widgets.Dialog.Types.exception)

});

jQuery.setCookie = function(b, c, a) {

 var d = new Date();

 d.setDate(d.getDate() + a);

 cookieDomain = ".wupload" + myTLD;

 document.cookie = b + "=" + escape(c) + ((a == null) ? "" : ";expires=" + d.toUTCString() + "; path=/;domain=" + cookieDomain + ";")

};

jQuery.getCookie = function(a)

8 0
4 years ago
Other questions:
  • Which of the following steps in enumeration penetration testing extracts information about encryption and hashing algorithms, au
    13·1 answer
  • What product category does the brand fit into?
    7·1 answer
  • I have two questions: 1: how do you credit only 5 points on brainl? (mine is only letting me give 10) and 2. How do I get a bria
    6·2 answers
  • Design and implement a program (name it Youth) that reads from the user an integer values repressing age (say, age). The program
    6·1 answer
  • Which of the following is false? Group of answer choices A) A string may include letters, digits, and various special characters
    7·1 answer
  • What are three key characteristics of an OS process?
    11·1 answer
  • Complete the function to return the factorial of the parameter,
    9·2 answers
  • List the caveats to this analysis and how they affect the research. How does this document define the ""typical game developer""
    7·2 answers
  • Activity #2
    13·1 answer
  • It's in Python, everything sort of explained in the image below,
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!