Powering the Future of Sustainable Transportation Introduction One of the biggest reasons behind Tesla's rapid growth is its network of Gigafactories. These massive manufacturing facilities are designed to produce electric vehicles (EVs), batteries, energy storage systems, and other clean-energy products at an unprecedented scale. By building Gigafactories around the world, Tesla has transformed the way vehicles and batteries are manufactured, helping accelerate the global transition to sustainable energy. What is a Gigafactory? A Gigafactory is a large-scale manufacturing facility built by Tesla, Inc. to produce batteries, electric vehicles, and energy products. The name "Gigafactory" comes from the word "gigawatt-hour," reflecting the enormous battery production capacity of these plants. Tesla's goal is to reduce manufacturing costs, increase production efficiency, and make electric vehicles more affordable for consumers worldwide. Major Tesla Gigafactorie...
C program to find the greatest among three integers:
#include <stdio.h>
int main() {
int num1, num2, num3;
printf("Enter three integers: ");
scanf("%d %d %d", &num1, &num2, &num3);
if(num1 > num2 && num1 > num3) {
printf("%d is the greatest.", num1);
}
else if(num2 > num1 && num2 > num3) {
printf("%d is the greatest.", num2);
}
else {
printf("%d is the greatest.", num3);
}
return 0;
}
In this program, we first declare three integer variables num1, num2, and num3. We then prompt the user to enter three integers using printf() and read those integers using scanf().
Next, we use a series of if and else if statements to compare the three numbers and determine which is the greatest. We use the logical operators && and || to combine conditions where necessary.
Finally, we print the result using printf().
Sample output :
The output of the program will depend on the values of the three integers entered by the user. Here's an example of what the output might look like for different inputs:
Example 1:
Enter three integers: 10 20 30
30 is the greatest.
Example 2:
Enter three integers: 20 10 20
20 is the greatest.
Example 3
Enter three integers: 5 5 5
5 is the greatest.
In Example 1, the greatest number is 30, so the program outputs "30 is the greatest."
In Example 2, the greatest number is 20, so the program outputs "20 is the greatest."
In Example 3, all three numbers are equal, so the program outputs "5 is the greatest."