answersLogoWhite

0


Best Answer

You'd probably want to use a real number, so a float would be fine:

int main (void) {

float current; // variable to store current in a circuit

// ...

return 0;

}

If you need greater precision than float provides, use double or long double instead. However, if you're only interested in integer values, use unsigned char, unsigned int, unsigned short int, unsigned long int or unsigned long long int, depending on the range of values you need to accommodate. Note that the range is implementation-dependant.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What code would you use to declare a variable that can store the current in a circut?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What code would you use to declare a variable that can store the current in a circuit?

double variable_list;


What code would you used to declare a variable that can store the current in a circuit?

double variable_list;


How do you declare a variable that stores happy new year or other greeting messages in visual basic 2010?

Declare a string variable to store the message value.For example:Dim message As String = "Happy New Year"Console.WriteLine(message)message = "Merry Christmas"Console.WriteLine(message)


How do you declare a variable that stores happy new year or other greeting massages in visual basic 2010?

Declare a string variable to store the message value. For example: Dim message As String = "Happy New Year" Console.WriteLine(message) message = "Merry Christmas" Console.WriteLine(message)


What is a variable used for in Python?

A variable is used to store information. As an example say you are asking someone for their favorite food, and want to store the answer in a variable called favoriteFood: favoriteFood = input("What is your favorite food?") Now if you print the value of favoriteFood (using print(FavoriteFood)) you will see that it has been saved in that variable. You can store any type in a variable, such as number, a string, or even an object.


How to Declare a variable that stores the cumulative sum java?

In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;In Java:You declare the variable like this:int sum;If you want to include decimals, change this to:double sum;To store an initial value, just use the assignment operator:sum = 0;You can combine this with the declaration:double sum = 0.0;To add something to the variable, for example the value of a variable called "x", use one of the following:sum = sum + x;sum += x;


What is application of arrays in C programming?

Array is used in C to store data of similar data type. Arrays are used when we want to store data in large quantities, e.g. if we want to store 100 numbers we have to declare 100 variables and remembering name of each variable is a very difficult task, here comes the array we can declare a single variable int num[100] now this variable can store 100 different or same numbers and can be accessed by referencing as num[0],num[1],num[2] and so on. So, we can say that to reduce efforts we use arrays.


Can variable resistors store electrical charge?

NO. Variable capacitory can store a small charge


Where can you get a laptop?

You can get a laptop from Circut city,Best buy( if you want to get it for cheap),or any other electronic store.


Why Java is called strongly typed language?

A strongly typed programming languages is one that requires the type of a variable to be explicitly stated. C is a strongly typed language. You must declare the type of data a variable will store for C to interpret it: int myVariable;myVariable = 25; Perl is a loosely typed language. There is no need to declare the variable type before using it: $myVariable = 25;$myVariable = "A String.";


How do you declare many float variables in java?

You can declare them one by one. However, if you want to store lots of related data, you may want to consider using an array, where you use a single variable name (for example) for 1000 different items, and a number called an index to access the individual items.


How do you buy a iPod?

you can buy it online or at the store. stores such as best buy, circut city, radioshack have them or the apple store that smells like old women and salmon.Answerwww.buyipod.ca