Can you please solve the program
Attachments:
Answers
Answered by
2
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
for(i=1;i<=10;i++)
{
printf("\n%d",i*i);
}
getch();
}
#include<conio.h>
void main()
{
int i;
for(i=1;i<=10;i++)
{
printf("\n%d",i*i);
}
getch();
}
Attachments:
Answered by
0
int main() {
clrscr();
int a=1, b=4,x=0,t,num;
cout<<"\nEnter a number: "; cin>>num;
x= b - a;
cout<<"\nThe series is:\n";
cout<<a<<","<<b<<",";
while(x<=num) {
x = x + 2; t = b + x; b=t;
cout<<t<<"," ;
} //End of While loop
return 0;
} //End of main loop
Note:- Enter the header files yourself!!
Cheers!!
Similar questions