Pages

Sunday, December 15, 2024

C Lab- BCA 1st Sem #02

 BCA C-Lab- 2nd Lecture 1st Sem

#include<stdio.h> 
 int main() 

{  int x; printf("Enter a number:- "); 
scanf("%d", &x);  if(x%2==0) { 
// == is for checking if both values are true 
printf("\nThe number is even");

 }
 printf("\nThank you :)");

 return 0; }


Things i learnt:- 

1. "==" is for checking if both values are true.


Dark Mode Notes

Welcome to your notes in dark mode! This style reduces eye strain during nighttime or extended reading.

Here’s an example of a code snippet:

printf("Hello, World!");

Feel free to add more content to make your notes stand out!

This is an example link.

No comments:

Post a Comment

3917. Count Indices With Opposite Parity (Brute Force) O(n2) + Optimized Solution O(n) + tips LEETCODE WEEKLY 500

  class Solution {     public int [] countOppositeParity ( int [] nums ) {          // approach 1 - checks every pair         int n = n...