Saturday, June 13, 2020
C programming Question and Answer Day-15
71. Program to check Niven number (Harshad number).
#include<stdio.h>
#include<conio.h>
void main()
{
int n, d, a, sum = 0;
clrscr();
printf("Enter the number : ");
scanf("%d", &n);
a = n;
while (a > 0)
{
...
Thursday, June 4, 2020
C programming Question ans Answer Day-14
66. Program to find power of number.
#include<stdio.h>
#include<conio.h>
void main()
{
int base, expo;
int value = 1;
clrscr();
printf("Enter base number : ");
scanf("%d", &base);
printf("Enter exponent number : ");
scanf("%d", &expo);
...
C programming Question and Answer Day-13
61. Program to calculate Square of 'n' numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
int n, r, i, sqr=0;
clrscr();
printf("\nEnter the range : ");
scanf("%d", &r);
for (i = 1; i <= r; i++)
{
n = i;
...
C programming Question and Answer Day-12
56. Add 'n' numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
int n, sum=0, i, value;
clrscr();
printf("Enter total numbers you want to add : ");
scanf("%d", &n);
for (i=1; i<=n; i++)
{
printf("Enter number %d : ", i);
...
C programming Question and Answer Day-11
51. Triangle with only border
#include<stdio.h>
#include<conio.h>
*
* *
* *
* *
* *
* *
* * * * * *
void drawTriangle(char border, char filler,...
Wednesday, June 3, 2020
C programming Question and Answer Day-10
46. Hourglass Pattern
* * * * * * * * *
* * * * * * *
* * * * *
* * *
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
#include<stdio.h>
#include<conio.h>
void...
C programming Question and Answer Day-9
41. Diamond of Numbers
1
2 2 2
3 3 3 3 3
4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5
4 4 4 4 4 4 4
3 3 3 3 3
2 2 2
1
#include<stdio.h>
#include<conio.h>
void...