prakash pankaj Dec 1st, 2012 Code#include<stdio.h> #include<conio.h> int main() { int r=2,i,a; for(i=1,a=1;a<10,i<10;a++,i++) { printf("%d",(a+pow(r,i)); } return 0; }
shweta gupta Profile Answers by shweta gupta Jun 25th, 2014 Code#include<iostream> using namespace std; int main() { int temp=3; for(int i=0;i<10;i++){ cout<<temp<<endl; temp=temp*2-i; } return 0; }
nira Jul 1st, 2014 Much easier approach, this is a logic question, not programming Code #include<stdio.h> #include<math.h> int main() { int a=1,r=2,i; for (i=0;i<=10;i++) printf(",%d ", a * pow(r,i) + i); return 0; }
What change is required in the following program so that its output becomes 3,6,11,20,37,......1034?
Profile Answers by Swati Goel Questions by Swati Goel
Questions by Swati Goel
Related Answered Questions
Related Open Questions