I tried using %.s
but I want don't wanna end up using it in every line is there any solution for this ?
#include<stdio.h>
void main()
{
printf("\n %40.s press :");
printf("\n %40.s 1.) Display all existing products:");
printf("\n %40.s 2.) Add new product details:");
printf("\n %40.s 3.) Edit a existing product:");
printf("\n %40.s 4.) Make a purchase.");
printf("\n %40.s 5.) Delete a list :");
printf("\n %40.s 6.) Display Profit/loss is sales:");
printf("\n %40.s 7.) Display all product with zero quantity");
printf("\n %40.s 8.) Display all product with highest quantity");
printf("\n %40.s 9.) Change user password.");
printf("\n %40.s 10.) Exit the program.\n");
}
And i want output like this.