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
lapo4ka [179]
3 years ago
7

Write the definition of a function named newbie that receives no parameters and returns 1 the first time it is invoked (when it

is a "newbie"), and that returns 0 every time that it is invoked after that.
Computers and Technology
1 answer:
nikklg [1K]3 years ago
4 0
Int  newbie(void){
static  int  a;
if(!a) {a=1;return  1;}
return 0;
}

You might be interested in
Write the class Calculator including: a function called addthat takes two parameters containing double values and returns their
patriot [66]

Answer:

public class Calculator {

       public double add(int a, int b){

       return a+b;

   }

   public double substract(int a, int b){

       return a-b;

   }

   public double multiply(int a, int b){

       return a*b;

   }

   public double divide(int a, int b){

       if(b>0){

           return a/b;

       }

       else{

           System.out.println("Cannot divide by zero");

       }

       return -1;

   }    

}

Explanation:

  • Using Java Programming Language, the class Calculator is created. There are no fields (Instance variables) and no constructors since these are not required by the question.
  • Four methods (functions) are created:  add, substract, multiply and divide as specified in the question.
  • Note the use of the if statement in the divide() to handle case of illegal division (by 0)

5 0
3 years ago
Hai<br> ill give 100 point if some won answers dis
Shalnov [3]
Well, thanks for the points !!!
8 0
3 years ago
Read 2 more answers
Is it possible for two different passwords to ""unlock"" the same user account? Explain your answer.
tresset_1 [31]

Answer:

yes but only if you have a backup password

4 0
4 years ago
The best description of a propriety database
Nikolay [14]
A proprietary database is a database that is privately owned and password protected. i hope this helps!!!! :)
6 0
4 years ago
______ a word object in an Excel worksheet to activate the word features
Rudik [331]

I’d say (C): Double clicking.

Double clicking a word object in an Excel worksheet activate the word features. You are able to embed a word document or a word object in your Excel sheet and access it with a few clicks.You can edit Word features by double-clicking it





3 0
3 years ago
Other questions:
  • If a program repeatedly shows separate feature branches rather than a true System Demo, which practice should be reviewed to add
    5·1 answer
  • You are troubleshooting a computer that is in the design phase. The problem you see is that the CPU is not receiving information
    13·1 answer
  • What is the main benefit of seeing your document in Page Break Preview?
    9·2 answers
  • The work principle is not always true<br> T or F
    11·2 answers
  • Select the correct statement(s) regarding CENTREX. a. CENTREX systems reside at the service providers central office, however, t
    11·1 answer
  • What does it mean to catch an exception?
    8·1 answer
  • Explain the developement of modern technology?
    13·2 answers
  • Write an application that displays the sizes of the files lyric1.txt and lyric2.txt in bytes as well as the ratio of their sizes
    15·1 answer
  • What is the molecular activity of mattern
    11·2 answers
  • A file can be safed with a different file name then it currently has by clicking on save ? in the file tab
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!