Write a program to add the following
¼+2/4+3/4+5/3+6/3+...
(Like up to any 12 no.s)
Answer / nitin garg
#include <stdio.h>
#include <conio.h>
int main()
{
float i,j,m=3,n=4;
float sum=0,fact=1;
for(i=1;i<=15;i++)
{
for(j=i;j<=m;j++)
{
sum=sum+(j/n);
printf("%f/%f +",j,n);
}
i=i+3;
m=m+4;
n--;
}
printf("
Sum of the series %f",sum);
getch();
}
| Is This Answer Correct ? | 4 Yes | 0 No |
how to print 2-D array using a single for loop?
2 Answers Mind Tree, TCS, Value Labs,
Explain how do you determine a file’s attributes?
every function has return the value?
main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }
5 Answers Amazon, HCL, Thought Works,
code for inverse a matrix
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel
What are two dimensional arrays alternatively called as?
please tell me the logic for this C program : INPUT (string):ABCD OUTPUT :BCDA CDAB DABC
In C programming, what command or code can be used to determine if a number of odd or even?
hi any body pls give me company name interview conduct "c" language only
#include <stdio.h> int main() { if ("X" <"x") printf("X smaller than x "); } my question is whats the mistake in this program? find it and please tell me..