answer.
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
labwork [276]
2 years ago
6

A U.S. social security number consists of a string of 9 digits, such as "444422333". Assume that input consists of a sequence of

9-digit social security numbers with no intervening spaces or separators of any kind:111223333444422333123456789987654321...Assume that a char array named ssn suitable for storing a social security number as a C-string has been declared . Use this array to read in 3 successive social security numbers and print each one out on a line by itself
Computers and Technology
2 answers:
harkovskaia [24]2 years ago
6 0

Answer:

767745089

Explanation:

Scrat [10]2 years ago
4 0

Answer:

void printSecurityNumber(char * securityNumber){

char subs[9];

int i = 0;

while(i < 27){

subs[i%9] = securityNumber[i];

i++;

if(i == 8){

printf("%s\n", subs);

}

}

}

Explanation:

I am going to write a for loop for this.

The "break" is at a multiple at position 8(9 digit from position 0 to 8), 17(9 digits from position 0 to 17), 26(9 digits from position 18 to 26).

void printSecurityNumber(char * securityNumber){

char subs[9];

int i = 0;

while(i < 27){

subs[i%9] = securityNumber[i];

i++;

if(i == 8){

printf("%s\n", subs);

}

}

}

You might be interested in
In a particular jurisdiction, taxi fares consist of a base fare of $4.00, plus $0.25 for every 140 meters traveled. Write a func
devlian [24]

Answer:

// here is code in java.

import java.util.*;

// class definition

class Main

{

// method that return total fare

   public static double fare(double dis)

   {

   // calculate the total fare

       double tot_fare=(4+((dis*1000)/140)*0.25);

       return the fare

       return tot_fare;

   

   }

   //driver method

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

{

   try{

    // scanner object to read input string

       Scanner s=new Scanner(System.in);

        // variable

       double dis;

       System.out.print("please enter the distance in KM: ");

       //read the number

       dis=s.nextDouble();

       

       // call the function with "dis" parameter

     double ride_fare=fare(dis);

     // print the total fare

     System.out.println("total fare is: "+ride_fare);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read the distance from user with the help of scanner class.Call the function with parameter "dis".Here it will calculate the total fare as (4+((dis*1000)/140)*0.25). Here base fare is $4 and $0.25 for every 140 meter.Then function will return the total fare.

Output:

please enter the distance in KM: 7                                                                                                                            

total fare is: 16.5  

7 0
2 years ago
Peter accumulated many photos from his visit to Wisconsin. He wants to upload these photos to a social networking site. Which fi
daser333 [38]

Answer:

JPG / JPEG best choice and work well on websites

Explanation:

JPEGs contains millions of colors, so this type of file is ideal for photographs.

Best choice for posting on social media channels

7 0
2 years ago
Poor quality lateral communication will result in which ofthe
zhuklara [117]

Answer:

b

Explanation:

b, lack of coordination

3 0
2 years ago
Read 2 more answers
Write a function addOddMinusEven that takes two integers indicating the starting point and the end point. Then calculate the sum
snow_lady [41]

Answer:g

   public static int addOddMinusEven(int start, int end){

       int odd =0;

       int even = 0;

       for(int i =start; i<end; i++){

           if(i%2==0){

               even = even+i;

           }

           else{

               odd = odd+i;

           }

       }

       return odd-even;

   }

}

Explanation:

Using Java programming language:

  • The method addOddMinusEven() is created to accept two parameters of ints start and end
  • Using a for loop statement we iterate from start to end but not including end
  • Using a modulos operator we check for even and odds
  • The method then returns odd-even
  • See below a complete method with a call to the method addOddMinusEven()

public class num13 {

   public static void main(String[] args) {

       int start = 2;

       int stop = 10;

       System.out.println(addOddMinusEven(start,stop));

   }

   public static int addOddMinusEven(int start, int end){

       int odd =0;

       int even = 0;

       for(int i =start; i<end; i++){

           if(i%2==0){

               even = even+i;

           }

           else{

               odd = odd+i;

           }

       }

       return odd-even;

   }

}

8 0
2 years ago
Which of the following represent features of free software licensing? Check all of the boxes that apply.
Iteru [2.4K]

Answer: A :is concerned with defending users’ freedom of use

C:makes source code available for editing

Explanation:

7 0
2 years ago
Other questions:
  • If you want to present slides to fellow students or coworkers which productivity software should you use to create them A. Word
    14·2 answers
  • List at least six things you would check for if you were asked to evaluate the workspace of an employee for ergonomics
    10·1 answer
  • Which advertising medium has the widest reach on a global front?
    12·1 answer
  • Lin is booting up his computer, and during the boot process, the computer powers down. After several unsuccessful attempts to bo
    12·1 answer
  • Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out t
    9·1 answer
  • Samuel received an email that looked like it came from his bank. The email told him to click a link that opened an official look
    7·1 answer
  • Define a new object in variable painter that has properties "name" storing "Vincent van Gogh"; "artworks" storing "The Starry Ni
    13·1 answer
  • In this problem, we want to compare the computational performance of symmetric and asymmetric algorithms. Assume a fast public-k
    11·1 answer
  • 3.34 LAB: Mad Lib - loops in C++
    14·1 answer
  • What is Accenture's role in Multi-party Systems?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!