Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- bhavinParticipant
Q.21 answer:
12345678910111213141516171819#include<stdio.h><br />#include<conio.h><br />int convert(float a);<br />void main()<br />{<br />float k;<br />clrscr();<br />printf("Enter any wieght in KG:");<br />scanf("%f",&k);<br />convert(k);<br />getch();<br />}<br />int convert(float r)<br />{<br />int a;<br />a=r*1000;<br />printf("nGram Value is = %dgrams",a);<br />return(0);<br />}output:
enter any weight in kg 2gram value is = 2000grams
bhavinParticipantqution no 20: answer
1234567891011121314151617181920<br />#include<stdio.h><br />#include<conio.h><br />void main()<br />{<br />int i,j;<br />clrscr();<br /><br />for(i=1;i<=5;i++)<br />{<br />if(i==4)<br />i=4+1;<br />for(j=1;j<=i;j++)<br />{<br />printf("*");<br />}<br />printf("n");<br />}<br />getch();<br />}output:
*
**
***
*****bhavinParticipantQuestion 19 answer:
12345678910111213#include<stdio.h><br />#include<conio.h><br />void main(){<br />int i,j;clrscr();<br />for(i=1;i<=5;i++){<br />for(j=1;j<=i;j++){<br />printf("*"); <br />} <br />printf("n");<br />}<br />getch();<br />}<br />output:
*
*****
****
***** - AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)