C command line program code using argv using for loop
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main(int argc,char*argv[])
{
int i,p=1;
// clrscr();
if(argc!=3)
{
printf("\nerror");
exit(1);
}
for(i=1;i<=atoi(argv[2]);i++);
{
p=p*atoi(argv[1]);
printf("%d",p);
}
getch();
}
examples for C command line program code using argv using for loop
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main(int argc,char*argv[])
{
int i,p=1;
// clrscr();
if(argc!=3)
{
printf("\nerror");
exit(1);
}
for(i=1;i<=atoi(argv[2]);i++);
{
p=p*atoi(argv[1]);
printf("%d",p);
}
getch();
}
examples for C command line program code using argv using for loop
0 comments: