Join Regular Classroom : Visit ClassroomTech

codewindow

C program to print a pattern – Coding Question 4

Write a C program to print the following pattern(till n rows, where n is taken as input). #include<stdio.h> #include<math.h> int main() { int i,j,h,space,x=1; printf("n Enter the height: "); scanf("%d",&h); for(i=1;i<=h;i++) { printf("n"); for(space=1;space<=(h-i);space++) printf(" "); for(j=1;j<=i;j++) { printf("%d ",x); x=1-x; } } return 0; } Join Our Telegram Group Visit our Facebook Page Coding […]

C program to print a pattern – Coding Question 4 Read More »

check a number whether it is odd or even by bitwise operato – Coding Question 3

Write a program to check a number whether it is odd or even by bitwise operator. #include<stdio.h> int main() { int a,b; printf("n Enter the a Number: "); scanf("%d",&a); b= a & 1; // Not Necessary only to check printf("n Resultant = %d",b); // Even odd Checking if(b) printf("n %d is odd",a); else printf("n %d

check a number whether it is odd or even by bitwise operato – Coding Question 3 Read More »

C program to convert a given temperature in Centigrade scale to its equivalent Fahrenheit scale – Coding Question 1

Write a complete C program to convert a given temperature in Centigrade scale to its equivalent Fahrenheit scale. #include<stdio.h> int main() { float c,f; printf("n Enter the temperature in Celcius: "); scanf("%f",&c); f=((9*c)/5)+32; printf("n The temperature in Fahrenheit Scale: %.2f degree Fahrenheit",f); return 0; } Join Our Telegram Group Visit our Facebook Page Coding Questions

C program to convert a given temperature in Centigrade scale to its equivalent Fahrenheit scale – Coding Question 1 Read More »