LAB RECORD PROGRAM NO -1 Get link Facebook X Pinterest Email Other Apps November 27, 2022 1.Write a C Program to demontate the Ternary Operator. #include <stdio.h> #include<conio.h> void main() { int age; // take input from users printf("\nEnter your age: "); scanf("%d", &age); // ternary operator to find if a person can vote or not (age >= 18) ? printf("You can vote") : printf("You cannot vote"); getch(); } Get link Facebook X Pinterest Email Other Apps Comments
C PROGRAM TO PRINT * DESIGN PATTERN January 02, 2023 # include <stdio.h> int main () { int i, j, rows; printf ( "Enter the number of rows: " ); scanf ( "%d" , &rows); for (i = 1 ; i <= rows; ++i) { for (j = 1 ; j <= i; ++j) { printf ( "* " ); } printf ( "\n" ); } return 0 ; } Read more
PPS UNIT 2 Notes December 23, 2022 PPS Unit 2 Notes complete https://drive.google.com/file/d/1hM43NMdIz1sfFixcIlTzz0S1OXxL8CRm/view?usp=share_link Read more
Comments
Post a Comment