B

@B_Adhvith103

Program to print first 10 natural num bers using while loop

C
2 years ago
#include <stdio.h> int main() { int i; while (i<=10) { printf("%d\n",i); i++; }

Program to print the Fibonacci series up to a given number using for loop in C Language

C
2 years ago
#include <stdio.h> int main() { int n1=0,n2=1,n3,i,number; printf("Enter the number of elements:\n"); scanf("%d",&number); printf("\n%d %d",n1,n2); for(i=2;i<number;++i) {

Program to enter a number and check whether it is a prime number or not using for loop in C

C
2 years ago
#include <stdio.h> int main() { int i,x,n=0; printf("Enter a positive number:\n"); scanf("%d", &x); for(i = 2; i < x; i++) { if(x%i!=0)

Program to enter a number and check whether that no is the perfect number or not?

C
2 years ago
#include <stdio.h> int main() { int i, num, sum = 0; printf("Enter any number to check perfect number:\n "); scanf("%d", &num); for(i = 1; i <= num / 2; i++) { if(num%i == 0)

Program to print the number from 1 to 10 using for loop

C
2 years ago
#include <stdio.h> int main() { int i; for (i=1;i<=10;i++) { printf("%d\n",i); } return 0;

a program in c to read 10 numbers from the keyboard and find their sum and average

C
2 years ago
#include <stdio.h> int main() { int i,n1,sum=0,avg; printf("Enter the number : \n"); for (i=1;i <= 10;i++) { scanf("%d",&n1);

c program to display n terms of natural numbers and their sum

C
2 years ago
#include <stdio.h> int main() { int i,n1,sum; printf("Enter a number of natural numbers:\n"); scanf("%d",&n1); for (i=1;i<n1;++i) {printf("%d\n",i); sum+=i;}

c program to display the n terms of odd numbers and their sum

C
2 years ago
#include <stdio.h> int main() { int i,term,sum; printf("enter the number of terms:\n"); scanf("%d",&term); for (i=1;i<term;i+=2) { printf("%d,",i);

a program in c to display the multiplication table for a given integer

C
2 years ago
#include <stdio.h> int main() { int i,n1,n2,multi; printf("Enter a number for multiplication:\n"); scanf("%d",&n1); printf("Enter the multipication limit:\n"); scanf("%d",&n2); printf("___________________________________\n");

program to computethe sum of the first 10 natural number

C
2 years ago
#include <stdio.h> int main() { int i,sum; for (i=1;i<=10;++i) { sum+=i; } printf("Sum = %d",sum);

program in c to display the first 10 natural numbers

C
2 years ago
#include <stdio.h> int main() { int i; for (i=1;i<11;++i) {printf("%d ",i); } return 0; }

nested swithc test program

C
2 years ago
#include <stdio.h> int main() { int a=10; int b=20; switch(a) { case 10: printf("outer switch \n");

Write a program to print the month name by given number using switch case

C
2 years ago
#include <stdio.h> int main() { int a; printf("Enter number of the month you want to see\n"); scanf("%d",&a); switch(a) { case 1: printf("JANUARY");

Write a program using switch case for printing you are eligible for voting or not.

C
2 years ago
#include <stdio.h> int main() { int n; printf("Enter the age: \n"); scanf("%d",&n); switch (n) { case 18: {printf("NOT ELIGIBLE FOR VOTING\n");

Write a program using switch case to check the CGPA on given condition.

C
2 years ago
#include <stdio.h> int main() { int n; printf("Enter the CGPA of student(8,10,7) : \n"); scanf("%d",&n); switch (n) { case 8:

Write a Program using switch case for performing operation on following conditions.

C
2 years ago
#include <stdio.h> int main() { char operation; int num1,num2; printf("Enter the numebr 1:\n"); scanf("%d",&num1); printf("Enter the number 2:\n"); scanf("%d",&num2);

multiply two float numbers (use data type is double) and print the answer with 3 precision point aft

C
2 years ago
#include <stdio.h> int main() { float a,b; printf("Enter the first number:\n"); scanf("%f",&a); printf("Enter the second number:\n"); scanf("%f",&b); printf("mutiple of 2 numbers is %.3f",a*b);

Write a

C
2 years ago
#include <stdio.h> int main() { float a = 10.257, b = 2589.257,d = 18.00; float c; c=a+b+d; printf("the is sum of three floating numbers : %.2f",c); return 0; }

7 code

C
2 years ago
#include <stdio.h> int main() { char b; scanf("%c",&b); if ((b >= 'a' && b <= 'z') || (b>= 'A' && b <= 'Z')) { printf("%c is an alphabet.\n",b);} else {printf("%c is a special character\n",b);} int b;

Division of 50.50 and 2.00 is: 25.25

C
2 years ago
#include <stdio.h> int main() { float a=50.50,b=2.00; float c; c=a / b; printf("%.2f",c); }