5.
Complete the given table:
Program Code
Write & justify
Output
a) #include <iostream.h>
int main()
int a, d, n;
std::cout << "Enter a, d, n of AP: ";
std::cin>> a > > d >> n;
std::cout << std::endl << "Terms of AP :
*
", d = " << d <<", n = " <<n
<< std::endl;
do 1
std::cout << a << "\t";
a = a + d;
}
while (n-- > 1);
std::cout << std::endl;
Answers
Answered by
0
Answer:
Complete the given table:
Program Code
Write & justify
Output
a) #include <iostream.h>
int main()
int a, d, n;
std::cout << "Enter a, d, n of AP: ";
std::cin>> a > > d >> n;
std::cout << std::endl << "Terms of AP :
*
", d = " << d <<", n = " <<n
<< std::endl;
do 1
std::cout << a << "\t";
a = a + d;
}
while (n-- > 1);
std::cout << std::endl;
Explanation:
Complete the given table:
Program Code
Write & justify
Output
a) #include <iostream.h>
int main()
int a, d, n;
std::cout << "Enter a, d, n of AP: ";
std::cin>> a > > d >> n;
std::cout << std::endl << "Terms of AP :
*
", d = " << d <<", n = " <<n
<< std::endl;
do 1
std::cout << a << "\t";
a = a + d;
}
while (n-- > 1);
std::cout << std::endl;
Answered by
0
Answer:
Enter a,d,n of AP: a=0, d=32766, n=0
0
Similar questions