M

@MEGHADEESHWAR

3

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

average

C
2 years ago
#include<stdio.h> int main() { float i,a,n,c; for(i=1;i<=10;++i) { scanf("%f",&n); a=c+i;

write a c program to display the nth term od odd numbers and theri sum

C
2 years ago
#include <stdio.h> int main() { int i,a,c=0; printf("enter a num \n"); scanf("%d",& a); for(i=1; i<a*2; ++i) { if(i%2!=0)

write a c program to display multiple of a integer

C
2 years ago
#include <stdio.h> int main() { int i,multiple ,a; printf("enter the number"); scanf("%d",& multiple); for (i=1; i<11; ++i) { a=multiple*i;

write a c program to compute the sum of the first 10 natural numbers

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

write a c program 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;

5

C
2 years ago
#include <stdio.h> int main() { int monthNumber; printf("Enter a number between 1 and 12: "); scanf("%d", &monthNumber); switch (monthNumber) { case 1:

4

C
2 years ago
.

3

C
2 years ago
#include <stdio.h> int main() { int age; printf("Enter your age: "); scanf("%d", &age); switch (age) { case 18:

2

C
2 years ago
#include <stdio.h> int main() { float cgpa; printf("Enter your CGPA: "); scanf("%f", &cgpa); switch ((int)cgpa) { case 8:

1

C
2 years ago
int main() { char operator; int num1, num2; printf("Enter operator (+, -, *, /): "); scanf(" %c", &operator); printf("Enter first integer: "); scanf("%d", &num1);

sq

C
2 years ago
#include <stdio.h> int main() { int x; printf ("enter the number\n"); scanf("%d",& x); if(x<10) { int square=x*x;

6

C
2 years ago
#include <stdio.h> int main() { int x; printf("enter the number: "); scanf("%d", & x); if (x<100) { if(x%2==0) {

dividion 50/2

C
2 years ago
#include <stdio.h> int main() { float n1,n2,sum; printf("float n1\n"); scanf("%f", & n1); printf("float n2\n"); scanf("%f", & n2); sum=n1/n2; printf("%f",sum);

c program to multi 3 points

C
2 years ago
#include <stdio.h> int main() { double n1,n2; printf("enter the first number:"); scanf("%lf", & n1); printf("enter the first number:"); scanf("%lf", & n2); double product= n1+n2; printf("the product is %.3lf\n",product);

write a c program to add 3 numbers

C
2 years ago
#include <stdio.h> int main() { double a=10.257; double b=2589.257; double d= 18; double sum= a + b + d; printf("The sum is %.2lf\n",sum); }

Write a C program to print weekday based on given number

C
2 years ago
#include <stdio.h> int main() { int dayNumber; printf("Enter a number (1-7) to get the corresponding weekday: "); scanf("%d", &dayNumber); switch (dayNumber) { case 1: printf("Sunday\n"); break;

Write a program to check whether the candidate is eligible for voting or not by accepting the age va

C
2 years ago
#include <stdio.h> int main() { int age; printf("Enter your age: "); scanf("%d", &age); if (age >= 18) { printf("You are eligible to vote.\n"); } else { printf("You are not eligible to vote.\n");

Write a c program to check the given number is even or odd

C
2 years ago
#include <stdio.h> int main() { int num; printf("Enter an integer: "); scanf("%d", &num); if (num % 2 == 0) { printf("%d is even.\n", num); } else { printf("%d is odd.\n", num); }

Write a program to check whether the given number is positive or negative or zero

C
2 years ago
#include <stdio.h> int main() { int num; printf("Enter an integer: "); scanf("%d", &num); if (num > 0) { printf("%d is positive.\n", num); } else if (num < 0) { printf("%d is negative.\n", num);