Exercise 01 in C 🏋️‍♂️ | Part - 28 | C Language For Beginners | Notes📝| Code1️⃣ 0️⃣ 1️⃣ | Hindi

preview_player
Показать описание
Exercise 01 in C 🏋️‍♂️ | Part - 28 | C Language For Beginners | Notes📝| Code1️⃣ 0️⃣ 1️⃣ | Hindi

Your Query:-
c language
c (programming language)
c language tutorial
programming language
c language exercise
c programming language
c language in english
c language in one video
programming language (software genre)
c language crash course in english
c language for beginners
c language full course
c language in one video tutorial
how to print pattern in c language
funny program in c language
c language tutorial for beginner
programming in c

#c language
#c (programming language)
#c language tutorial
#programming language
Рекомендации по теме
Комментарии
Автор

Daily videos at 6:30 PM! ⏰ Got questions? Feel free to ask! 😊

HelLoProgrammers-nick
Автор

Code - 📝📝

//⚠⚠ Copy the data, paste it into a text file, and save it. ⚠⚠


/*
//Problem 01 - Hello World Program 😊

#include <stdio.h>

int main() {
// Print the string "Hello, World!" to the console
printf("Hello, World!\n");
printf("Hello, World!\n");
return 0; // Return 0 to indicate successful program execution
}
*/


/*
//Problem 02 - Sum of Two Numbers 😊

#include <stdio.h>

int main() {
int a = 10, b = 20, sum; // Predefined values for a and b

// Calculate the sum of the two numbers
sum = a + b;

// Print the sum to the console
printf("Sum: %d\n", sum);
return 0;
}

*/




/*
//Problem 03 - Check Even or Odd 😊

#include <stdio.h>

int main() {
int num = 7; // Predefined value for num

// Check if the number is divisible by 2 (even number)
if (num % 2 == 0) {
printf("%d is even.\n", num); // If true, print that the number is even
} else {
printf("%d is odd.\n", num); // Otherwise, print that the number is odd
}
return 0;
}
*/





Multiple Choice Questions 📝✏📄📚







/*
//Problem 04 - Find Largest of Three Numbers 😊

#include <stdio.h>

int main() {
int a = 5, b = 12, c = 9; // Predefined values for a, b, and c

// Compare the numbers to find the largest
if (a >= b && a >= c) {
printf("Largest number: %d\n", a); // If a is the largest
} else if (b >= a && b >= c) {
printf("Largest number: %d\n", b); // If b is the largest
} else {
printf("Largest number: %d\n", c); // If c is the largest
}
return 0;
}
*/




/*
//Problem 05 - Simple Calculator 😊
#include <stdio.h>

int main() {
char operator = '-'; // Predefined operator
double num1 = 10.5, num2 = 5.0; // Predefined numbers

// Use a switch-case structure to perform different operations based on the operator
switch (operator) {
case '+':
printf("Result: %.2lf\n", num1 + num2); // Addition
break;
case '-':
printf("Result: %.2lf\n", num1 - num2); // Subtraction
break;
case '*':
printf("Result: %.2lf\n", num1 * num2); // Multiplication
break;
case '/':
if (num2 != 0)
printf("Result: %.2lf\n", num1 / num2); // Division
else
printf("Error! Division by zero.\n");
break;
default:
printf("Error! Operator is not correct.\n"); // Invalid operator
}

return 0;
}

*/

HelLoProgrammers-nick