C Programming || Write a program to accept a number and check if it is divisible by 5 and 7.

preview_player
Показать описание
Write a program to accept a number and check if it is divisible by 5 and 7.

Mr. Programmer

The program is given in the comment box below.

#c #cprogrammingexamplesplaylist #c #computerscience #cprogramming
Programmers write code for computer programs and mobile applications. They also are involved in maintaining, debugging and troubleshooting systems and software to ensure that everything is running smoothly.

Mr. Programmer writes code in all programming languages. If you have any questions about any programming language, you can write questions in the comment box. Of course you do The program or video of that program will be provided.

#MrProgrammer
Рекомендации по теме
Комментарии
Автор

#include<stdio.h>
void main()
{
int num;
printf("Enter the number: ");
scanf("%d", &num);
if (num % 5 == 0)
{
if (num % 7 == 0)
printf("Number is divisible by 5 and 7\n");
else
printf("Number is divisible by 5 but not by 7\n");
}
else
printf("Number is not divisible by 5 \n");
}

MrProgrammer
Автор

Write a program to accept a number and check if it is divisible by 5 and 7.

MrProgrammer
welcome to shbcf.ru