#include<stdio.h>
#include<conio.h>
#define p printf
#define s scanf
int main()
{
clrscr();
int a,b,c,d,e;
int ans;
p("\nEnter first no.:");
s("%d",&a);
p("\nEnter second no.:");
s("%d",&b);
p("\nEnter third no.:");
s("%d",&c);
p("\nEnter fourth no.:");
s("%d",&d);
p("\nEnter fifth no.:");
s("%d",&e);
ans=(a+b+c+d+e)/5;
p("\nThe average is: %d",ans);
getch();
return 0;
}
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
#include
you do this 10 print "0112358132134" use the whole of the thing
echo 'print a pattern'
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
#include
you do this 10 print "0112358132134" use the whole of the thing
write a program to print A to Z on screen in c?
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
Write a c program to print the 100 to 1 nos
echo 'print a pattern'
Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.
Reference:http:cprogramming-bd.com/c_page2.aspx# strange number
write a program to print the series 1/12+1/22+.........+1/n2 ?