M

@Mirdula_Sampathkumar

Write a program IN C to display the multiplication table for a given integer

C
2 years ago
#include <stdio.h> int main() { int i,product,num; scanf("%d",&num); printf("The multiplication table of a given number is %d\n",num); for(i=1;i<=10;++i) { product=num*i; printf("%d*%d=%d\n",i,num,product);

Write a C program to display n terms of natural nmbers and their sum

C
2 years ago
#include <stdio.h> int main() { int i,n,sum=0; scanf("%d",&n); printf("The nth natural number is:"); printf("\nThe first %d natural numbers are:\n",n); for(i=1; i<=n ; i++) { printf("%d\n",i);

Write a C program to compute the the sum of the first 10 natural numbers

C
2 years ago
#include <stdio.h> int main() { int i,Sum=0; printf("The sum of the first 10 natural numbers:\n"); for(i=1; i<=10; i++) { Sum=Sum+i; printf("%d\n",i); }

Write a C program to display the first 10 natural numbers

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

Question 4

C
2 years ago
#include <stdio.h> int main() { int month; scanf("%d",&month); printf("%d\n",month); switch(month) { case 1: printf("The month is January\n");

Question 3

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

Question 2

C
2 years ago
#include <stdio.h> int main() { int result; scanf("%d",&result); printf("%d\n",result); switch(result) { case 8: printf("You got 8 CGPA\n");

Question 1

C
2 years ago
#include <stdio.h> int main() { char operator; int a,b,c; scanf("%c",&operator); scanf("%d",&a); scanf("%d",&b); printf("The two given integers are:\n%d\n%d\n",a,b); switch(operator)

6.Write c program to check if number is less than 100

C
2 years ago
#include <stdio.h> int main() { int number; printf("Enter a number\n"); scanf("%d",&number); printf("number=%d\n",number); if(number<100) { printf("The number is less than 100\n");

Write a C program to analyse the character

C
2 years ago
#include <stdio.h> int main() { char character; printf("Enter a character:\n"); scanf("%c",&character); printf("The character entered by the user=%c\n",character); if(character>='A' && character<='Z') { printf("The character is ALPHABET\n");

Write a C program to square a number

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

4.Write C program to read two numbers

C
2 years ago
#include <stdio.h> int main() { int num1,num2,quotient; printf("Enter the two numbers:\n"); scanf("%d",&num1); printf("num1=%d\n",num1); scanf("%d",&num2); printf("num2=%d\n",num2); quotient=num1/num2;

Write a C program to get output

C
2 years ago
#include <stdio.h> int main() { float divident,divisor,quotient; divident=50.50; divisor=2.00; quotient=divident/divisor; printf("The quotient=%f\n",quotient); return 0; }

Write C program to multiply two float numbers

C
2 years ago
#include <stdio.h> int main() { double num1,num2,product; printf("Enter the two numbers:\n"); scanf("%lf",&num1); printf("num1=%lf\n",num1); scanf("%lf",&num2); printf("num2=%lf\n",num2); product=num1*num2;

Write a C program to add 3 nos. with 2 points after decimal

C
2 years ago
#include <stdio.h> #include<math.h> int main() { float a,b,sum; int d; a=10.257; b=2589.257; d=18; sum=a+b+d;

C program to calculate the grade of student according to his mark

C
2 years ago
#include <stdio.h> int main() { int mark; scanf("%d",&mark); printf("The mark of the student=%d\n",mark); if(mark>85 && mark<=100) { printf("The grade of the student is A\n"); }

C program to find if a number is even or odd

C
2 years ago
#include <stdio.h> int main() { int a; scanf("%d",&a); printf("The value of the number=%d\n",a); if(a%2==0) { printf("The number is even\n"); }

Consider 3 digits and point the larger number

C
2 years ago
#include <stdio.h> int main() { int num1,num2,num3; scanf("%d",&num1); printf("The value of the first number=%d\n",num1); scanf("%d",&num2); printf("The value of the second number=%d\n",num2); scanf("%d",&num3); printf("The value of the third number=%d\n",num3);

Consider two numbers and print the biggest number

C
2 years ago
#include <stdio.h> int main() { int num1,num2; scanf("%d",&num1); printf("Value of first number=%d\n",num1); scanf("%d",&num2); printf("Value of second number=%d\n",num2); if(num1>num2) {